title: D365 JavaScript Create a new record with a lookup, optionset and money field
body: <p>I am trying to create a new record by calling the <code>SDK.REST.CreateRecord</code> function from JavaScript. Below is the code snippet with which I am trying without any improvement - </p>
  
  <pre><code>function CreateProspect(QuoteId) {
    SDK.REST.retrieveRecord(QuoteId, "brm_quote", "brm_quotedexipt,brm_inceptiondate,brm_Client", null, function (result) {
       var prospect= {
         brm_inceptiondate: getFomattedDate(result.brm_inceptiondate),
         brm_clientName: {
           Id:result.brm_Client.Id, 
           LogicalName :"brm_ClientName"
         },//lookup fails
         brm_currentAmount:{ 
           Value:result.brm_quotedexipt.Value
         },//moneyfield fails
         brm_type: {Value:17200001} //optionset field Fails
      }
  
      SDK.REST.createRecord(prospect,"brm_prospect", function(){
        alert('New prospect created')
      },function (error) { 
        alert(error.message); 
      })
    }, function (error) { 
      alert(error.message); 
    });
  }
  </code></pre>
  
  <p>Need some help to find the correct way to add a <em>lookup</em> / <em>optionset</em> and <em>decimal</em> properties to the javascript object such that CRM can interpret it correctly while reading it from the SDK Create method.</p>
  
  <p>Any help on this much appreciated. Thank you. </p>