Documents fields imported after No.

lccjlccj Member Posts: 11
edited 2004-01-28 in Navision Attain
Help!!

For some strange reason some fields like "Description 2" or "Vendo No" are not updated from the Item to documents after inserting the "No." althought the code is on "No." Validation funtcion as it is for "Description" that always updated.

Can anyone help on an explanation, please.

Thanks
Best Regards

Lcj

Comments

  • SbhatSbhat Member Posts: 301
    Hi,

    Check if the Description 2 field is a flowfied, then you have to put a code as calcfields and then it would update. Moreover if you could be more specific in your question, like which form or table this is happening, i could give you better solution.

    Regards
    Suresh.
  • lccjlccj Member Posts: 11
    On inserting a sales line type Item, you choose the product and it updates alone the fields Description, groups and other Item Data. For some reason I haven't been able to insert anything on some fields they just don't update and guive no error message. Are Normal fields and update code is on "Item No." Validation funtion. two of the fields are "Description 2" and "Vendor Item No."

    Thank You
    Best Regards

    Lcj
  • awarnawarn Member Posts: 261
    Description 2 should automatically update when the No. field is validated:

    (from the OnValidate of the No. field in the Sales Line table)
    Type::Item:
    BEGIN
    GetItem;
    Item.TESTFIELD(Blocked,FALSE);
    Item.TESTFIELD("Inventory Posting Group");
    Item.TESTFIELD("Gen. Prod. Posting Group");

    Description := Item.Description;
    "Description 2" := Item."Description 2"; <

    Of course the Item has to have a description 2 filled before it will appear on the sales line...

    If you want the Vendor Item no to fill (I can assume you have added the Vendor Item No field to the Sales Line table), just add another line of code:


    Type::Item:
    BEGIN
    GetItem;
    Item.TESTFIELD(Blocked,FALSE);
    Item.TESTFIELD("Inventory Posting Group");
    Item.TESTFIELD("Gen. Prod. Posting Group");

    Description := Item.Description;
    "Description 2" := Item."Description 2";
    "Vendor Item No." := Item."Vendor Item No."; //<--new line

    Again, the Item must have this field filled for it to fill on the line.

    Is this what youa re trying to do?

    -A
Sign In or Register to comment.