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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to load different forms within the entity onLoad based on field value in the entity

(0) ShareShare
ReportReport
Posted on by 4,515
Hi, I need some help how to load the form of an entity I have Account entity which has 2 forms (BUYER and SELLER). I have a field in the form for option set Buyer or Seller.. How can I make my SELLER form load OnLoad when my Seller field option is selected???? Any help would be much appreciated

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Nizar JLASSI Profile Picture
    2 on at

    Hi donyc,

    The built-in form selection is managed by security roles not by fields content.

    But there is a way, you can use formSelector object in OnLoad() Envent on your form. 

    This formSelector object that you can use it by Javascript and it allow you to choose one form between all form that you have access.

    But there is a bad point with this solution (the unique solution). Your main form will load untill all your page is loaded with the whole DOM and after that you can change form. It looks like your form appear twice.

    If you insist to do it : use this Xrm.Page.ui.formSelector.items.get(1).navigate();

    (1) is your form number in the items array.

     

    Nizar JLASSI
    Dymamics CRM Trainer and Senior Consultant
    Email : n.jlassi@gmail.com

    4TOCOPWZQ6TL.jpg  4TOCOSXBT5KL.jpg  4TOOJYT41KG6.jpg  

  • donyc Profile Picture
    4,515 on at

    thanks!

  • Nizar JLASSI Profile Picture
    2 on at

    U R Welcome donyc :)

    Nizar JLASSI
    Dymamics CRM Trainer and Senior Consultant
    Email : n.jlassi@gmail.com

    4TOCOPWZQ6TL.jpg  4TOCOSXBT5KL.jpg  4TOOJYT41KG6.jpg  

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans