Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How do i retrieve the record attributes from the lookup field.

(0) ShareShare
ReportReport
Posted on by 20

I want to check if the record selected in the lookup is an active record or inactive record. 

I am able to retrieve the ID of that record but not able to get the fields available on that record. 

please help me with the query.

  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    RE: How do i retrieve the record attributes from the lookup field.

    Hi Manth,

    You can retrieve the record to get status field through the ID.

    The Dataverse REST Builder tool can help you build code easily:

    https://github.com/GuidoPreite/DRB 

    https://www.theblueflamelabs.com/lets-utilize-dataverse-rest-builder-to-create-a-web-api-for-dynamics-365-ce/ 

    pastedimage1671873676963v1.png

    pastedimage1671873772809v2.png

    You can copy these code, then use dynamic value to replace static id value in your js code.

  • Guido Preite Profile Picture
    54,075 Moderator on at
    RE: How do i retrieve the record attributes from the lookup field.

    don't create a new thread on the same topic.

    You need to retrieve the record using Xrm.WebApi (or another method to query the Web API endpoint) in order to retrieve the statuscode field.

    The other thread contains some code you can start with.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,006 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,837 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans