Tying a variable between two tables

SeraphSeraph Member Posts: 9
What I'm exactly doing is this:

A new field in both the Vendor table and the Item Table. The variable is to keep track of who is taking care of what vendors and the items for those vendors.

My question is: How can I make it so that the variable in the item card will automatically match the variable that has been already set in the vendor card, based on matching the Vendor No. up.
I'd likely make the field in the Item card uneditable so it can only be managed from the Vendor Card.


I'm currently using Navision 3.70. Thanks in advance for your help.

Comments

  • KarenhKarenh Member Posts: 209
    You could add the variable to the vendor table.

    Don't add a field to the item table. Instead, edit the item card. Create a new global variable of the same type and size as was added to the vendor table. in the onaftergetcurrrecord trigger, put in some code like:

    CLEAR(vNewField);
    IF "Vendor No." <> '' THEN BEGIN
    Item.GET("Vendor No.");
    vNewField := Vendor.NewField;
    END


    Add a textbox to the item card, whose SourcExpr is vNewField

    Bob's your uncle.
Sign In or Register to comment.