Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Customize Contact Lookup Field

(1) ShareShare
ReportReport
Posted on by 63
Hi, in the case form, I added a contact field so that the user can select a contact when creating a case because I want them to add the account in the customer field and the contacted individual in the contact field. 

Is there a way to customize the contact lookup field so that it only shows the contacts associated with the selected customer instead of showing all active contacts? (by customer I mean account)

  • YB Profile Picture
    YB 63 on at
    Customize Contact Lookup Field
    Hi, yes it is the same one.

  • Suggested answer
    Cui Hao Profile Picture
    Cui Hao on at
    Customize Contact Lookup Field
    Hi,
     
    There are two /Contact/ fields in the system, you need to add the field logically named /primarycontactid/.
    Do you see that the fields you've added are the same as the ones I've shown below?
    If it's convenient, could you please take a screenshot to show me the field properties?
     
    Best regards,
    Cui Hao
     
     
     
  • YB Profile Picture
    YB 63 on at
    Customize Contact Lookup Field
    Hi, it is not working in my case. Even when I don't click on all records, it shows me all the contacts in the system instead of just showing me the ones associated with the selected customer. 
  • Suggested answer
    Cui Hao Profile Picture
    Cui Hao on at
    Customize Contact Lookup Field
    Hi,
     
    Do you have any other questions? If you have any other questions feel free to ask me.
    If it solved your problem, please mark it as verified to help other community members find more. 
     
     
     
    Best regards,
    Cui Hao
  • Suggested answer
    Cui Hao Profile Picture
    Cui Hao on at
    Customize Contact Lookup Field
    Hi,

    I found an existing /Contact/ field in the system that accomplishes your needs.
    To verify that this system field is available, I did the following test:
    As you can see through this web request, the filtering conditions of this /contact/ system field are based on this /Customer/, and as long as you don't click to switch to /All Record/, then it will prioritize the contacts associated with the selected customer by default.




    I also tried redefining a lookup field using JavaScript, but found that I still get the same problem as with this system field.
    After various tests, I found that the reason I could switch to /All Records/ was because of the Lookup control's original functionality, and even re-customizing the field filtering logic wouldn't change the control's already existing functionality.

    So I recommend you to use this /Contact/ system field, which will prioritize the display of this contact related to Customer, as long as you don't make the switch.



    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.


    Best regards,
    Cui Hao

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans