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

entity with multiple forms

(0) ShareShare
ReportReport
Posted on by 3,674

dear all,

i have custom entity with multiple forms, i create some security roles so the user can select the form based on their security role. (form role based).

if i have some user with 2 security role so he can access more than form. if this user select the entity and click new

i need specific form to be viewed, or select specific form form the sitemap (as we set the default view using the url.)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    you can add javascript on form load and then navigate to specific form.

    You can use 

    Xrm.Page.ui.formSelector.items .navigate

    To navigate to specific form. 

    please ref.

    msdn.microsoft.com/.../gg309560.aspx

  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi Hamzeh,

    As far as I know, yes you are right, if user with valid Security Role, can see more than 1 Forms, and also the form that they will see is the last form they were using.

    For example: I am user can see Form A and B.

    At first, you set the order, Form A first, then form B.

    Then, you have valid security role, you can change form A to form B, then when you close this entity form.

    And you come again, open again this entity form, by default, it will be form B opened to form A.

    It was they call as feature: Navigate to where you were left behind last time and it is stored in the User setting entity.

    Btw, you can force the user to always open the form A in the form onLoad, it is using javascript function.

    forms[indxForms].navigate();

    Example of usage:

    rajeevpentyala.wordpress.com/.../set-desired-form-as-default-using-script-crm-2011

    community.dynamics.com/.../335421.aspx

    But I personally never try the first link, there is a possibility causing the user cannot go to other forms, you need to try it first.

    Thanks.

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Hamzeh,

    I found another way, actually they are two.

    First, since sitemap as far as I know, can only open the URL (can be external link or web resource, cannot be calling the js action), so you need to put javascript code to navigate to the exact form you want.

    Check this link out

    community.dynamics.com/.../120363.aspx

    blog.dorrekens.com/.../159-open-a-form-based-on-a-record-attribute

    and this:

    msdn.microsoft.com/.../72a66f93-92df-42b9-a8fd-b6125c7fe83b

    SO put your javascript to open the new window using openEntityForm

    Secondly, if you want to open the URL (but kind of hardcode the form URL with specific ID), Use this URL for example:

    https://crmserver.crm5.dynamics.com/main.aspx?etn=account&pagetype=entityrecord&extraqs=formid%3DB053A39A-041A-4356-ACEF-DDF00182762B%0D%0A

    So what you need is to find the Form Id.

    Go to the form editor and get the ID, in my example I have 2 forms of account, Account and Information

    If I go to the customization

    *Account:

    https://crmserver.crm5.dynamics.com/main.aspx?appSolutionId=%7bFD140AAF-4DF4-11DD-BD17-0019B9312238%7d&etc=1&extraqs=formtype%3dmain%26formId%3d8448B78F-8F42-454E-8E2A-F8196B0419AF%26action%3d-1&pagetype=formeditor

    *Information:

    https://crmserver.crm5.dynamics.com/main.aspx?appSolutionId=%7bFD140AAF-4DF4-11DD-BD17-0019B9312238%7d&etc=1&extraqs=formtype%3dmain%26formId%3dB053A39A-041A-4356-ACEF-DDF00182762B%26action%3d-1&pagetype=formeditor

    So, if I want to make the Information as the main default, I just put the formid as the parameter (the bold one - 3DB053A39A-041A-4356-ACEF-DDF00182762B).

    Hope this helps you!

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans