Out-of-the-box, D365 Activity Party List field, say, Appointment’s Required/Optional Attendees fields lets you choose among multiple Activity Party enabled entities when you want to select records. And perhaps you don’t even want users to select what’s not relevant.
Let’s look at how we can show only the required entities in the selection list.
Before that, if you want to check how you can enable custom entities for the Activity Party, you can refer this post of mine – Enable entity for Party List selection in Appointment
Hide entities from the Activity Party List field
This can be achieved by writing a simple JS code and calling it onLoad of the Appointment form where the Party List field exists.
- Let’s say you only want to show the entities Lead and Contact in the Required Attendees Party List field
- Here’s the JS code that goes on the onLoad function of the Appointment form
- And call the method filterRequiredAttendees onLoad as below
- The Appointment’s Required Attendees field will show only the entities you provided in the setLookupTypes([“lead”,”contact”]);
Hope this helps!
3 thoughts on “Show specific entities in Activity Party List Lookup in D365 Activity entity”
There is a simpler syntax that will accomplish this.
Nice! I’ll try this and update the blog post as well so that it helps others. Thank you!
I’ve updated the blog post to show improved code. Thanks!