How do a fileld editable in Item ledger entry table

markyTmarkyT Member Posts: 120
Hello, I think this is easy for experts :oops: I've a field in "Item ledger Entry" table and I want inform it from "Form 38". How can I made this field editable?.
Thanks in advance.

Comments

  • ara3nara3n Member Posts: 9,256
    take a look at how customer ledger entry form 25 does it.
    its a protected table and things like due dates are editable.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • markyTmarkyT Member Posts: 120
    Thanks, but I can't see anything special in this field or in this form. Can you help me with a some more specific information, please?.
    Thanks for help.
  • markyTmarkyT Member Posts: 120
    Thanks, but I can't see anything special in this field or in this form. Can you help me with a some more specific information, please?.
    Thanks for help.
  • ara3nara3n Member Posts: 9,256
    you make the form editable. And go through all the fields and make then editable except the fields you want to allow to edit.

    Then add code onmodify trigger to call your Codeunit to do the actual modification since the table is protected. The CU needs to have permission to modify ILE.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • David_SingletonDavid_Singleton Member Posts: 5,479
    markyT wrote:
    Thanks, but I can't see anything special in this field or in this form. Can you help me with a some more specific information, please?.
    Thanks for help.

    Just run on the debugger and/or code monitor you will see it quite clearly.
    David Singleton
  • markyTmarkyT Member Posts: 120
    Thanks for reply. Excuse my ignorance, but I make the form editable but the user has not permission to write in it. I guess I've to indicate on the codeunit, but I can't find the codeunit nor the function from that codeunit that made it.
    Thanks for help.
  • BeliasBelias Member Posts: 2,998
    you have to create your own codeunit to do this modification. As said, you can get a hint from form 25.
    But if you're not expert, this can be dangerous for your data. Be sure to test it a lot if you're not sure of your implementation. Also, make sure thate a proper training is done to the user. They shouldn't post wrong item ledger entries (in an ideal world :) ).
    Moreover, there are tables related to the item ledger entries that you maybe want to modify as well (depending on the fields you make editable). Check out these related tables from the "navigate" button in the item ledger entries, and ask a senior developer.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • markyTmarkyT Member Posts: 120
    My own codeunit?, buff..., I did not know this was going to be so complicated. Sometimes I've done the same in a field from "Cust Ledger Entry" table modifing codeunit 103, I supposed that with a field on "Item ledger Entry" table could do the same.
    Thanks for help.
  • ta5ta5 Member Posts: 1,164
    Hi MarkyT
    My 2 cents: Hands off if you are not a seasoned dev in this area. Better not to touch than break it :-k
    Regards
    Thomas
  • ppavukppavuk Member Posts: 334
    First of all I would ask, what exactly field you need to modify. I seen a cases when after ILE or GLE modification system was literally ruined, and customer had to pay huge money to fix, which wasn't bad:)
  • markyTmarkyT Member Posts: 120
    Thanks everybody for reply.
    Hands off if you are not a seasoned dev in this area. Better not to touch than break it
    Well, obviously I'm not an super+expert but I defend well, and always work with a test database for any problem. But thanks for the advice.
    First of all I would ask, what exactly field you need to modify. I seen a cases when after ILE or GLE modification system was literally ruined, and customer had to pay huge money to fix,

    I've created two new fields, a boolean and text field, and I need inform it on Form-38. I did it with other tables, but with "Item ledger entry" table I can't.
    Thanks for help.
  • ppavukppavuk Member Posts: 334
    What a reason to update ILE by user? Normally ledgers are created by system, and never updated. Apart of couple of cases like due date for cust. ledger entry.
  • markyTmarkyT Member Posts: 120
    Thanks. Because is an information that arrives after register the movement.
    Thanks.
  • BeliasBelias Member Posts: 2,998
    oh, ok...2 custom fields. you certainly know what logic there's behind them, so you are not in danger as long as you are sure to make editable only the right fields.
    Well, the solution has already been told to you: a customer license does not permit to modify the item ledger entry, so you have to create a codeunit with modify permission on ILE table, and make the modification in that codeunit. As said, check the "onmodifyrecord" trigger of cust. ledg. entry. (you will have to create a codeunit similar to codeunit 103)
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • markyTmarkyT Member Posts: 120
    OK, I'll try it. Thanks everybody for information.
    Thanks for help.
Sign In or Register to comment.