Error 400 :Bad request.Error Processing request Stream.The Property id for specific type Microsoft.Crm.Sdk.Data.Services.Entity reference is not valid. Pls help me to resolve it.
MY code is:
function createREST()
{
var createEmail= {};
createEmail.Subject= "My Email";
createEmail.atos_customername="Santhosh Deepak";
createEmail.Description="This is my new test Email";
createEmail.RegardingObjectId= {id: "DE3C3D58-93DE-E411-A903-00505684005D" , logicalName: "incident", type: "EntityReference"};
/*
SDK.REST.createRecord(
createEmail,
"Email",
function (createEmail) {
},
function errorHandler(error)
{
alert(error.message);
}
);
}