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

Announcements

News and Announcements icon
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!
 
 
 
I have the same question (0)

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
11manish Profile Picture

11manish 121

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans