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...
Suggested Answer

Javascript code to get count of contacts and accounts used in lookup field to user

(0) ShareShare
ReportReport
Posted on by 10

Hi,

How can I read count of records from contact and account which is  a lookup field to User Entity using javascript

and how to compare lookup field with either account or contact because lookup field is having name,guid but account or contact entity  is having only user name stored.

eg A record created in lookup will have

FullName   LookUp        Contactid

John             Bill             Guid of  John stored here

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Javascript code to get count of contacts and accounts used in lookup field to user

    Hi EKL,

    The count of records shown in lookup field depend on the view you select.

    By default, the lookup view is selected and you can change to other views in lookup fields.

    pastedimage1629094833007v1.png

    Also, new records that created from lookup are not different, which is same with records that created with normal ways.

    when you create a new contact in the view, it also generates guid, but it doesn't show up on the form, you can view it in the url.

    pastedimage1629095993799v2.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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
#ManoVerse Profile Picture

#ManoVerse 101

#2
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans