Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
What the below code does . I have defined Location_Rec in C/Al Globals as Record DataType
IF Location_Rec.GET("Location Code") THEN;
I want to display Location Details of that record in Report Header.
GET function is use to find values, which is based on primary key. So in your code it says find the location based on the location code.
Using IF condition we can do the error handling.
Now you can access location details, like location Name, Address what ever details in Location table (14)
For instance, In location table suppose you have four locations, Red, Green, Blue, Yellow;
In your sales order or purchase order you have selected location code as Blue.
Now with your code, it will check whether we have location code blue in the location table, if yes program will catch the record, and you can access any details related to location blue. Location.Name ., Location.Address like wise
More Information about GET function
If you think this will help you. You can mark as Verified answer.
U mean to say by writing below code i can access all details of that Location
Yes of course. If the Location found in Location table then you can access all details related to given location.
If you think this will help you. You can mark this answer as Verified answer.