Copy values from one form to another

sridharsridhar Member Posts: 171
I have a card form say with field "ID" and "Name". I have a list form that will open when I click the lookup button of the "Name" field of the Card form.

My question is :

1. How to copy the value of ID field in the card form to the ID field of the list form?
2. How to assign the selected Name in the list form to the Name field of the card form?(Eg :- I want to select a particular user from the list of users).

Comments

  • DenSterDenSter Member Posts: 8,307
    The easiest way to accomplish that is to add a field that links to the code field. From a database design standpoint that is a better solution anyway, so you have a foreign key in your table. Then, you make the name field a flowfield that looks up into the name field of the other table. Then you need to program one line of code in the OnValidate of the foreign key field (CALCFIELD(name)), and when you select a number from the list, your form should automatically update.

    I'm writing this real quickly, so if it doesn't make sense I will spend some more time on it later today. There are plenty of examples of this in standard Navision.
  • sridharsridhar Member Posts: 171
    Thanks Denster
Sign In or Register to comment.