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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how to open custom form in crm?

(0) ShareShare
ReportReport
Posted on by

Hello, I've created a new custom form in CRM to serve as a condensed and specialized view of the case form. This case will be opened via a ribbon button.

I created the new form under Customizations > Case > Forms. Now I'm trying to figure out how to open this form via js from a ribbon button? Can you explain how I would go about doing this?

Also, is my understanding that I can create this new form as 1 type of case form and it will call PreCaseUpdate plugin without any additional configuration or wireup?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    jlattimer Profile Picture
    24,564 on at

    Check out this from the SDK: Open Forms, Views, Dialogs and Reports with a URL

    Also look at the section titled: Query String Parameters for the Main.aspx Page - specifically using the extraqs parameter to pass the formid

  • Vijay Waghmare Profile Picture
    on at

    Rightly suggested by Jason to pass formid parameter in extraqs, below is JS code to achieve it

    function openEntityForm(etn, pagetype, formid, id) {

       var context = Xrm.Page.context;

       var sUrl = context.getServerUrl();

       sUrl = sUrl + "/main.aspx?etn=" + etn;

       if (pagetype != null) {

           sUrl = sUrl + "&pagetype=" + pagetype;

       }

       if(formid != null){

           sUrl = sUrl + "&extraqs=formid%3D" + formid + "%0D%0A";

       }

       if (id != null) {

               sUrl = sUrl + "&id=" + id ;

       }

      window.open(sUrl, "mywindow", "location=0,resizable=1,status=1,scrollbars=1, width=800,height=600");

    }

    Thanks,

    Vijay Waghmare

  • Community Member Profile Picture
    on at

    I'm using the SDK approach.  The implementation appears to be fairly straightforward.  However, the following code is opening a different version of the incident form.  For parameters["formid"] I tried the SystemForm.FormId and SystemForm.FormIdUnique.  Neither of these id's are opening the expected form.  Is there something I'm doing wrong here?  Is there some additional step or trick I need to do to make the form open as expected?:

    var parameters = {};

    parameters["formid"] = "15257636-D5D0-4B7E-B93B-64E876DD59E1"

    var incidentId = "83640CBC-B550-E311-9B13-00155D760004";

    Xrm.Utility.openEntityForm("incident", incidentId, parameters)

  • Verified answer
    jlattimer Profile Picture
    24,564 on at

    What you have works code wise. I'd suggest opening the form in the form editor from the Customizations -> Entity -> Forms area and grabbing the URL in Notepad and getting the form id - probably looks like this:

    https://yourorg.crm.dynamics.com/main.aspx?appSolutionId=%7bFD140AAF-4DF4-11DD-BD17-0019B9312238%7d&etc=112&extraqs=formtype%3dmain%26formId%3d6AF7E7E2-4B17-4700-90D6-BE8F23E3B2C4%26action%3d-1&pagetype=formeditor#180991895

    You want: 6AF7E7E2-4B17-4700-90D6-BE8F23E3B2C4

  • Community Member Profile Picture
    on at

    For some reason, my new custom case form is getting opened by default when I open a case through the system.  Is there some type of "default form" property that I can set to have the previous case form open by default?

  • Verified answer
    jlattimer Profile Picture
    24,564 on at

    There is a form order you can set. Under the list of forms it should be at the top of the grid. Keep in mind also security can get applied to forms as well.

  • Community Member Profile Picture
    on at

    Hi Jason - Here's a screenshot of my customizations view:

    www.dropbox.com/.../form_order.png

    Form Order for Cases is configured with "Case Open" first and "Repro Review" last. However, the default case navigation in the app is opening the "Repro Review" form instead of the "Case Open" form. Is there a different setting I should be looking for?  Or is it possible that something is cached and I need to restart the server?

  • Community Member Profile Picture
    on at

    I figured it out.  I've learned that with CRM sometimes you have to "jiggle the handle."  I removed the security permissions, published, then added the permissions back.  Then the default form configuration started working as expected.

  • Community Member Profile Picture
    on at

    Unfortunately, the solution I described in my last post only works in the same session.  When I close my browsers, then reopen my browser and retry the use case, the old behavior returns: CRM opens a case form type that is not set to the top of the Form Order as the default case form type.  Not sure how to fix this.

  • Community Member Profile Picture
    on at

    A different user tried this use case and the proper version of the case form displayed as expected for him.  However, I still have the issue of the wrong case form displaying by default for me. Is it possible that CRM may sometimes caches custom form priority based on the user who created the custom form?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans