Facing Problem in adding a new field in a table

hksharmaahksharmaa Member Posts: 55
I had created a new field in Item Table which is linked with my item. Now i want that in Item Journal line that when i select that item the new field that i had created must come there with the value

Comments

  • SavatageSavatage Member Posts: 7,142
    You have to add your field also to the Item Journal Line Table.

    If you look at the c/al code on that table you will find

    Item No. - OnValidate()
    .
    .
    GetItem;
    Item.TESTFIELD(Blocked,FALSE);
    Description := Item.Description;
    "Description 2" := Item."Description 2";
    "Inventory Posting Group" := Item."Inventory Posting Group";
    "Product Group Code" := Item."Product Group Code";
    "YourField" := Item."YourField"; //add in your fieldinfo
    .
    .

    If you don't have access to the code on the form you will have to create a lookup type flowfield.

    Then add your field to the form.

    Ps. Welcome to the forum.
    Please use a more descriptive Subject line - so others in the future can find the answer if they have the same problem.

    Please read the forum rules
    http://www.mibuso.com/forum/viewtopic.php?t=9884

    Enjoy!
  • hksharmaahksharmaa Member Posts: 55
    I have wtitten the code but i am not getting the value in my new field.............In the Item table there is a field called "Print Name". I want this field to come in Item Journal Line Table .....i have also created a new field in the Item journal line table named as "Print Name".as soon as i select the Item in the Item Journal line Table, the Print name should also come along with it along with the Item in the Journal item Table.
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,499
    Please edit your Topic title and change it something more meaningful. People don't tend to read/answer "Please help me" topics.
  • ssinglassingla Member Posts: 2,973
    In the Item Journal Line on Valiadate trigger of Item No. the following code is written:
    GetItem;
    Item.TESTFIELD(Blocked,FALSE);
    Description := Item.Description;
    "Inventory Posting Group" := Item."Inventory Posting Group";
    "Item Category Code" := Item."Item Category Code";
    "Product Group Code" := Item."Product Group Code";

    Add your line after the code
    YourField := Item.Yourfield
    CA Sandeep Singla
    http://ssdynamics.co.in
  • hksharmaahksharmaa Member Posts: 55
    It Worked .............Thanks A Lot............. :D
  • SavatageSavatage Member Posts: 7,142
    ssingla wrote:
    In the Item Journal Line on Valiadate trigger of Item No. the following code is written:
    GetItem;
    Item.TESTFIELD(Blocked,FALSE);
    Description := Item.Description;
    "Inventory Posting Group" := Item."Inventory Posting Group";
    "Item Category Code" := Item."Item Category Code";
    "Product Group Code" := Item."Product Group Code";

    Add your line after the code
    YourField := Item.Yourfield

    Looks familiar :mrgreen:
  • ssinglassingla Member Posts: 2,973
    :-#
    CA Sandeep Singla
    http://ssdynamics.co.in
Sign In or Register to comment.