How to set "ITEM TRACKING CODE" field option

klinspatrickklinspatrick Member Posts: 58
Hi, All,

See anyone can help, thanks.

I would like to get a default option in a field named "ITEM TRACKING CODE"(Which has LOT, LOT1, NONE) in the Item table when I create a new item. For example, it takes LOT1 for each new item created.

If any default setting in Navision will be great, as users can change as their perference.

Patrick

Comments

  • ArhontisArhontis Member Posts: 667
    Hi,

    You should add a line on the OnInsert trigger of the Item table that sets that field with validation.
    VALIDATE("Item Tracking Code",'LOT1');
    
    Keep in mind that once the item get some entries that particular field cannont be changed.
  • kinekine Member Posts: 12,562
    I recommend:

    1) Read posts about DEFAULT VALUE (there are described ways how to do that)
    2) When using code to set the value, use some setup table to keep the value and do not code it directly in C/AL...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • klinspatrickklinspatrick Member Posts: 58
    Hi, Kine,

    Can you advise where I can find "DEFAULT VALUE" posts? I did search the forum by this, but no findings.

    Patrick
Sign In or Register to comment.