Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Using JavaScript to create custom views without using addCustomView

(1) ShareShare
ReportReport
Posted on by
I want to be able to dynamically change the view using JavaScript code in my Form Script file. The form uses a Multiselect Control, so using the addCustomView lookup control method will not work. It does work, however, if I select an arbitrary lookup control and add the custom view to that. This method requires at least one basic lookup control to be on the form, however. The Multiselect Control takes in a property to store the view ID to be used as the default view. I want to be able to change the view based on certain events that occur in the form, such as selecting one of the other fields with a particular value. My only solution is to add an arbitrary lookup field to the form that I don't intend on using, just so I can use addCustomView on it. I am looking for a better way. If anyone knows, please share. Thanks!
 
 
 

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 671 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 167 Super User 2025 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 138 Most Valuable Professional

Product updates

Dynamics 365 release plans