Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

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

Posted on by

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans