title: Cannot set multi-select option field when creating record in Dynamics 365 XRM Web API
body: <p>I am attempting to create a record using the Dynamics 365 Web API. The field trying to be set is a multi-select option and is supposed to take an array of integers.  The value being passed in is an array of integers (2nd screenshot), and yet I am getting the following error:</p>
  
  <blockquote>
    <p>An unexpected 'StartArray' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected.?</p>
    
    <p><a href="https://i.stack.imgur.com/NuBrh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NuBrh.png" alt="**enter image description here**"></a></p>
    
    <p><a href="https://i.stack.imgur.com/boHDE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/boHDE.png" alt="enter image description here"></a></p>
  </blockquote>
  
  <p>Below is the code being used, identifying the line causing trouble.</p>
  
  <pre><code>var data = {
              "title": "sample title",
              "new_f1": f1_value,
              "new_meetingdate": meeting_date,
              "new_trainingmodules": training_modules, // Error on this line
              "new_annualnoticedate": annual_notices,
  
          }  
  
          Xrm.WebApi.createRecord("incident", data).then(
              function success(result) {
                  alert("Case record created.");
              },
              function (error) {
                  alert("error.message);
                  // handle error conditions
              }
          );
  
  </code></pre>