web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to get a field value based on a lookup value?

(0) ShareShare
ReportReport
Posted on by 190

Hi, I have a user's name lookup value in the main form that looks up to a custom user table.  So I know how to get the lookup value using javascript, but how can I get another field (user's email) using the user's name for that same record using javascript?

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: How to get a field value based on a lookup value?

    I recommend using Xrm.WebApi, the second link I provided. If you want to generate the "stub" code that you will use after - use DRB, third link.

  • Suggested answer
    bp3378 Profile Picture
    190 on at
    RE: How to get a field value based on a lookup value?

    Hi andrew butenko thanks for the reply.  I have been using XMLHttpRequest(), which should I be using instead?

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: How to get a field value based on a lookup value?

    Hello,

    You will have to combine the following articles:

    1. www.adyatantech.com/.../how-to-get-and-set-lookup-field-values-using-javascript - getting of the id from the lookup field placed on the form.

    2. learn.microsoft.com/.../retrieverecord - querying the record information based on the record logical name and id.

    3. The easiest way to pre-cook your query is to use Dataverse Rest Builder - github.com/.../DRB

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 191

#2
Sahan Hasitha Profile Picture

Sahan Hasitha 152

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 129 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans