Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Open Specific quickCre...
Sales forum
Answered

Open Specific quickCreateForm

Posted on by Microsoft Employee

Hi All,

I have several quick Create form in Case entity in  Dynamics 365. Also, I added a custom button on the Case entity and my plan is to open one of theses Quick create forms. 

I added formId as bellow in the parameters, but it not works and doesn't open my Quick create form.

var param = {};
param["formId"] = "My Id";
Xrm.Utility.openQuickCreate("incident", null, param);

Anyone can advise about this?

Thanks

Categories:
  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: Open Specific quickCreateForm

    Hi Aamir,

    I'm sorry it didn't work out.

    As Marco mentioned, you can have multiple Quick Create Forms but always one is used (based on the form order).

    If you have a specific quick create form that should open always, change the order accordingly (so it opens by default).

    I hope this helps.

    Best,

    Wahaj

  • Verified answer
    Marco.P Profile Picture
    Marco.P 2,405 on at
    RE: Open Specific quickCreateForm

    I'm Sorry but that Is the intended behaviour by MS, you can only use one Quick create form.

    According to Microsoft documentation:

    Although you can define multiple quick create forms, only one quick create form can be used by everyone. The form everyone will use is set using the form order. Quick create forms cannot be assigned to security roles and they do not provide the capability for the user to switch forms.

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/create-edit-quick-create-forms

    So It opens another form 'cause that form Is the First One by form order.

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/assign-form-order#:~:text=To%20assign%20a%20form%20order,-In%20the%20solutions&text=In%20the%20form%20list%20toolbar,down%20in%20the%20form%20order.

    Hope it helps,

    Marco

    If you found the answer helpful for you or other readers, please mark as Verified.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Open Specific quickCreateForm

    Hi Wahaj,

    Many times checked and it still opening another Quick Create form.

  • Ana Almeida Profile Picture
    Ana Almeida on at
    RE: Open Specific quickCreateForm

    Hello,

    To open the main form in a dialog using client API, you need to invoke the call using the Xrm.Navigation.navigateTo method. The Xrm.Navigation.navigateTo API method allows you to open the dialog with several options, including the size and position.

    var pageInput = {

       pageType: "entityrecord",

       entityName: "account",

       formType: 2,

    };

    var navigationOptions = {

       target: 2,

       width: {value: 50, unit:"%"},

       position: 1

    };

    Xrm.Navigation.navigateTo(pageInput, navigationOptions);

    pastedimage1594987134552v1.png

    Offcial documentation: https://docs.microsoft.com/pt-pt/powerapps/developer/model-driven-apps/customize-entity-forms#open-main-form-in-a-dialog-using-client-api

  • Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: Open Specific quickCreateForm

    Hi Amir,

    Xrm.Utility.openQuickCreate function is deprecated.

    You need to use Xrm.Navigation.openForm(entityFormOptions,formParameters) function.

    In enittyFormOptions object, you need to set useQuickCreateForm=true to open Quick Create Form. You can also set formId property top open specific quick create form. 

    Here is an example:

    var entityFormOptions = {};

    entityFormOptions["entityName"] = "incident";

    entityFormOptions["useQuickCreateForm"] = true;

    entityFormOptions["formId"] = "Specific form Id";

    Xrm.Navigation.openForm(entityFormOptions, null).then(
    function (lookup) { console.log("Success"); },
    function (error) { console.log("Error"); }
    );

    Here is the documentation on this function:

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/openform

    I hope this solves the problem, let me know the results.

    Best,

    Wahaj

    (if it helps, mark it verified)

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans