web
You’re offline. This is a read only version of the page.
close
Skip to main content
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? 

I have the same question (0)
  • Suggested answer
    LeoAlt Profile Picture
    16,331 Moderator on at
    RE: JS Code for partlist

    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
    RE: JS Code for partlist

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 36 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans