web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

JS Code for partlist

(1) ShareShare
ReportReport
Posted on by 1,942

Hi All,

I am looking for a JavaScript code to filter a lookup (partlist type) to show a default view without giving much options. I've created custom Activity entity where I have to show only projects (PSA) for the "Regarding" field and nothing else. My environment is D365 UCI -Version 1710 (9.1.0.9627) online


Does anyone has experience with this kind of requirement or has JS Code sample? 

  • Suggested answer
    LeoAlt Profile Picture
    16,341 Moderator on at

    Hi partner,

    You could not regard an activity to another one.

    I suggest that you could associate two activities through an intermediate entity like case, account...

    If you must do this, you could only creeat an additional relationship between the two activity entites.

    I've tried to use "SetDefaultView()" function and it did not work because PSA is not in the lookup record entity list.

    Hope it helps.

    Best Regards,

    Leo

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You will write JavaScript that will do that filtering for you  - docs.microsoft.com/.../setentitytypes

    Good luck.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
11manish Profile Picture

11manish 50 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 45

#3
Ayesha Wajahat Profile Picture

Ayesha Wajahat 18

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans