web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    Take a look at this-

    dynamicsofdynamicscrm.com/.../

    Hope this helps.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Below is the official documentation-

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

    Hope this helps.

  • ajyendra Profile Picture
    1,738 on at

    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?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans