Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to pass a Multi-select option set value as a parameter to Xrm.Utility.openEntityForm?

(0) ShareShare
ReportReport
Posted on by 927

I'm currently trying to copy values over to a new form with Javascript and having issues with Multi-select option set.

This is the error I get:

Error converting value 629940000 to type 'System.Collections.Generic.List`1[System.Int32]'. Path '', line 1, position 9. ---> System.ArgumentException: Could not cast or convert from System.Int64 to System.Collections.Generic.List`1[System.Int32].

What I've tried:

var parameters = {};

parameters["new_class"] = [629940000,629940001];
Xrm.Utility.openEntityForm("quote", null, parameters);

//Also tried:
var parameters = {};
parameters["new_class"] = Xrm.Page.getAttribute("new_class").getValue();
Xrm.Utility.openEntityForm("quote", null, parameters);

Both tests are giving me the same result. Is it event possible to achieve this?

Thanks in advance for your replies,

Best Regards

*This post is locked for comments

  • ajyendra Profile Picture
    1,738 on at
    RE: How to pass a Multi-select option set value as a parameter to Xrm.Utility.openEntityForm?

    Hi @Loic Orue,

    Both cases quote form is open for me. Is your form is not open is that the issue or I misunderstood something?

  • RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: How to pass a Multi-select option set value as a parameter to Xrm.Utility.openEntityForm?

    Below is the official documentation-

    docs.microsoft.com/.../set-field-values-using-parameters-passed-form

    Hope this helps.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: How to pass a Multi-select option set value as a parameter to Xrm.Utility.openEntityForm?

    Hi,

    Take a look at this-

    dynamicsofdynamicscrm.com/.../

    Hope this helps.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans