Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

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

Posted on by 2

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

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee 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

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans