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 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)
  • ARTECH Profile Picture
    247 on at

    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

  • Suggested answer
    Community Member Profile Picture
    on at

    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

  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Moderator on at

    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

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 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 127

#2
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans