Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Switch Forms Based on a Field Value or Selected View in Dynamics 365

Posted on by 37

Hello Microsoft Community,

I’m working in Dynamics 365 Sales and have a requirement to dynamically switch forms based on the type of account being worked on. Here's the scenario:

  • We have multiple forms for the Account entity, customized for different account types (e.g., Distributor vs. Customer).
  • I’d like to automatically load the appropriate form when a user opens an account record, based on a field value like "Account Type."

For example:

  • If "Account Type" = "Distributor," the "Distributor Account Form" should load.
  • If "Account Type" = "Customer," the "Customer Account Form" should load.

Alternatively, if a user is in a specific view (e.g., "Distributor Accounts"), can the system load a specific form for accounts opened from that view?

Is this possible using out-of-the-box features, or would it require JavaScript customization? If someone has tackled a similar challenge or has insights into achieving this functionality, I’d greatly appreciate your advice or guidance.

Thank you for your help!

Categories:
  • Aya Attari Profile Picture
    Aya Attari 37 on at
    Switch Forms Based on a Field Value or Selected View in Dynamics 365
    Thank you
     
    We have tested this code but still it is not switching the forms according to the field value
    Is there is another approach we can take to achieve this?
  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 8,179 Super User 2024 Season 1 on at
    Switch Forms Based on a Field Value or Selected View in Dynamics 365
    You need a function On Form Load. Compare different conditions and then load appropriate for. Please refer below article which will help you to implement your requirement.
     

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templates⚡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans