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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to pass multiselect option set values to Quick Create form using Xrm.Navigation.openForm

(0) ShareShare
ReportReport
Posted on by 247

Hello,

I am looking for a solution in which I want to open a Quick Create form on click of Ribbon Button and on open of Quick Create form I want that some values from the parent record should get mapped to the Quick Create form.

In this all fields mapped successfully except the Multi Option Set field. This field is having 10 options out of which 3 options are selected and the same I want on the Quick Create form of other entity.

Remember I have retrieved a record from the preveious entity using Xrm.WebApi.retrieveRecord and its retrieved data I have in result as follows:

var abc= result["cs_abctype"];

I need to set the same option set values to Quick Create form through
Xrm.Navigation.openForm(entityOptions, formParameters)

Thanks

AR

I have the same question (0)
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    RE: How to pass multiselect option set values to Quick Create form using Xrm.Navigation.openForm

    Hello AR ,

    Please refer below thread where I have already provided the solution for your requirement. And for the Multiselect option set please refer below code.

        

    function setField()
    {
        var entityFormOptions = {};
        entityFormOptions["entityName"] = "contact";
        entityFormOptions["useQuickCreateForm"] = true;
    
        optionsetValues = [821220000,821220001,821220004]; // declare an arry and provide the optionset values
        
        // Set default values for the Contact form
        var formParameters = {};
        formParameters["firstname"] = "Sample";
        formParameters["lastname"] = "Contact";
        formParameters["fullname"] = "Sample Contact";
        formParameters["emailaddress1"] = "contact@adventure-works.com";
        formParameters["jobtitle"] = "Sr. Marketing Manager";
        formParameters["donotemail"] = "1";
        formParameters["description"] = "Default values for this record were set programmatically.";
        
        formParameters["ak_multiselect"] = optionsetValues; // Optionset value set
    
        // Open the form.
        Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
            function (success) {
                console.log(success);
            },
            function (error) {
                console.log(error);
            });
    }

    Add option set value in an array. and pass it to the field.

    pastedimage1654511044951v1.png

    Output : 

    pastedimage1654511156338v2.png

    pastedimage1654511203334v3.png

    Thank you,

    Amit Katariya

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to pass multiselect option set values to Quick Create form using Xrm.Navigation.openForm

    Hi AR,

    This should be a bug. I tested this before and all type fields could be pre set successfully besides multi-select option.  You would better raise a ticket to feedback this.

    Set field values using parameters passed to a form (Developer Guide for Dynamics 365 Customer Engagement) | Microsoft Docs

  • ARTECH Profile Picture
    247 on at
    How to pass multiselect option set values to Quick Create form using Xrm.Navigation.openForm

    Hello,

    I am looking for a solution in which I want to open a Quick Create form on click of Ribbon Button and on open of Quick Create form I want that some values from the parent record should get mapped to the Quick Create form.

    In this all fields mapped successfully except the Multi Option Set field. This field is having 10 options out of which 3 options are selected and the same I want on the Quick Create form of other entity.

    Remember I have retrieved a record from the preveious entity using Xrm.WebApi.retrieveRecord and its retrieved data I have in result as follows:

    var abc= result["cs_abctype"];

    I need to set the same option set values to Quick Create form through
    Xrm.Navigation.openForm(entityOptions, formParameters)

    Thanks

    AR

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 359

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 77 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans