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)

Multiple Opportunity form

(0) ShareShare
ReportReport
Posted on by 420
Hello, In Dynamics CRM 2013, I have 3 business units and 3 opportunity forms in opportunity entity, all forms are having separate data capture fields. Security roles are assigned to each form so that the people in concerned business unit can access/add/edit it. all is ok up to here. VP sales have security role to access all 3 types of opportunities and can add/edit etc. Problem: When VP clicks any opportunity in the view, it open in wrong opportunity form and he has to select from the top the correct form to get the complete record. Is there any way to let the opportunity open automatically in the form in which it was originally created? Many thanks in advance. Siddiq

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Karth Profile Picture
    on at

    You can configure the order in which the form needs to be rendered. Go to System View Customization. Click on Form Order. Click on Main Form Set. Use the arrows to specify the order in which you want the form to be displayed.

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    By default CRM will open up the last viewed form. You can use javascript to change the form dynamically based on some values on the form using Xrm.Page.ui.formSelector.items.get(itemId).navigate();

    See ms-dynamics-crm2011.blogspot.co.uk/.../how-to-change-form-type-dynamically.html

    Hope this helps,

    Scott

  • Zulqarnain Profile Picture
    420 on at

    Ordering the forms didn't solve the issue, opportunity not related to the form on top in order will open with it and the issue remains same until a user switch to the appropriate form.

    I think there should be some thing (link/relation/action) which can bind the opportunity record to the form it was created in.

    looking forward for more support and ideas.

    Thanks

  • Zulqarnain Profile Picture
    420 on at

    Hello Scott,

    Thank you, your suggestion's was valuable, However I tried your solution but somehow didn't work, I am little confused on weather to use a fixed field value on each form or an option set. in case of option set, a value is selected when during new entry.

    By the way is there any way to stop CRM remembering last viewed form, this was I might not need Java script.

    Many thanks in advance and looking forward

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    There isn't anyway of stopping it remembering the last form unfortunately.

    If you'd like to post your javascript we can take a look.

    Cheers,

    Scott

  • Zulqarnain Profile Picture
    420 on at

    Hi Scott,

    I have an option set on each form having 3 options e.g. Unit1, Unit2, Unit3

    You gave an idea to use Java script, I used the below the below script, and called SetForm() function on form load.

    ------------------------

    function SetForm()

    {

     var currentForm = Xrm.Page.ui.formSelector.getCurrentItem().getId();

     var Information;

     var cType = Xrm.Page.data.entity.attributes.get('new_businessunit').getText().toLowerCase();

     if(cType == '')

     {

      return;

     }

     var forms = Xrm.Page.ui.formSelector.items.get();

     var i = 0;

     for (i = 0; i < forms.length; i++)

     {

       if (forms[i].getLabel().toLowerCase() == cType)

       {

        if (currentForm != forms[i].getId())

        {

          forms[i].navigate();

        }

        return;

       }

       if (forms[i].getLabel().toLowerCase() == 'New')

       {

        Information = forms[i];

       }

     }

     if (currentForm != Information.getId())

     {

      Information.navigate();

     }

    }

  • ScottDurow Profile Picture
    21 on at

    Are you getting an error?

  • Zulqarnain Profile Picture
    420 on at

    No, there is no error message. is that code correct? or the method I am using. Since I am not good at all in Java, I still don't understand how the above code works.

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