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

Notifications

Announcements

No record found.

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

    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

  • Suggested answer
    bp3378 Profile Picture
    190 on at

    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

    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.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 51 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans