Hi
I have written the below code . I want to know how these lines function
1. No. - OnLookup(VAR Text : Text) : Boolean
2. IF PAGE.RUNMODAL(0, ItemRec) = ACTION::LookupOK THEN
3. What is Rec,xRec in C/Al Symbol Menu
PHRec is Purchase Header Record SubType
No. - OnLookup(VAR Text : Text) : Boolean
PHRec.RESET;
PHRec.SETRANGE("No.", "Document No.");
IF PHRec.FINDFIRST THEN;
ItemRec.RESET;
ItemRec.SETRANGE("Vendor No.", PHRec."Buy-from Vendor No.");
IF PAGE.RUNMODAL(0, ItemRec) = ACTION::LookupOK THEN
Text := ItemRec."No.";
Thanks
*This post is locked for comments
The first is the OnLookup trigger for No field. This is the event triggered when you click on that field.
The second is the C/AL instruction for opening the default lookup page for a table.
Hi
Thanks. What does the below 2 lines do
1. No. - OnLookup(VAR Text : Text) : Boolean
2. IF PAGE.RUNMODAL(0, ItemRec) = ACTION::LookupOK THEN
Thanks
Rec contains the current record, xRec contains the previous version of the current record (before updates or field changments).
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156