I have the following code that launches a form:
BoxPalletRec.SETRANGE(SOType,"Source Subtype");
BoxPalletRec.SETRANGE(SONbr,"Source No.");
BoxPalletRec.SETRANGE(SOLine,"Source Line No.");
BoxPalletRec.SETRANGE(ItemNo, "Item No.");
BoxPalletRec.SetShipmentInfo("No.","Line No.");
FORM.RUNMODAL(FORM::"Ship Box", BoxPalletRec);
The line BoxPalletRec.SetShipmentInfo("No.","Line No."); calls a function that sets the value of two global variables...Once the form is loaded and the Validate runs for a specific field I want to access the values of these two global variables within the Validate. For some reason they are empty when the validate runs.
In my mind, the RUNMODAL passed in the BoxPalletRec including the values of the global variables already set. What am I missing?
0
Comments
You need to create a variable ShipBox (Form) put the function in there and set the variables.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
In the code you are passing a record variable. When the form loads it retrieves that record from the database. Global variable values are not stored in the database so the form won't know about them.
My Blog - nav.education