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 :
Customer experience | Sales, Customer Insights,...
Answered

How to set the multiselect option set values through the array???

(0) ShareShare
ReportReport
Posted on by 425

Hi ,

I have a account entity lookup on case entity and a global multiselect optionset being used on both level account and case.

My requirement is to set the multiselect option set values from account level to case level during the on change of account lookup field on case level.

I have done this thing through JavaScript (rest API) and I have an array in which all the multiselect option set values from account level but I am not able to set this array into multiselect optionset field on case Level.

var array = new Array();

var multiselect = result["schemaname of account multiselect field"];   //result is coming from rest API and giving the data in string form

array = multiselect.split(",");

formContext.getAttribute("caseMultiselect").setValue(array);

Please suggest .

I have the same question (0)
  • Verified answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    I have already provided solution for your requirement in your other post.

    Please try the code I provided and let me know if it works

  • Verified answer
    furkank Profile Picture
    535 on at

    Hi,

    You need an array of optionset values.

    For instance:

    formContext.getAttribute(fieldname).setValue([1001,1002,1003]);

    Please debug your code at your "array = multiselect.split(",");" step and see your array actually in this format. if it is, you probably have a different issue.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans