Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)
Posted on by 3,027

Hi

   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.

Thanks

*This post is locked for comments

  • Verified answer
    ShanAbeywicrema Profile Picture
    ShanAbeywicrema 940 on at
    RE: Code

    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.

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: Code

    Hi

       U mean to say by writing below code i can access all details of that Location

    Location_Rec.GET("Location Code");

    Thanks

  • Suggested answer
    ShanAbeywicrema Profile Picture
    ShanAbeywicrema 940 on at
    RE: Code

    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

    navsupports.com/dynamics-nav-get-function

    If you think this will help you. You can mark as Verified answer.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans