Create D365 Post entity record
var record = {};
record["regardingobjectid_contact@odata.bind"] = "/contacts(ff072662-ef61-e511-93fc-000d3ab14dd2)";
//record["regardingobjectid_new_customerregistration@odata.bind"] = "/bupa_customerregistrations(910e6373-0c2f-eb11-a813-000d3a219518)"; //for custom entity
record["text"] = "Customer Registration record linked success"; // Text
record["source"] = 2; // Choice
record["type"] = 2; // Choice
Xrm.WebApi.createRecord("post", record).then(
function success(result) {
var newId = result.id;
console.log(newId);
alert(newId)
},
function(error) {
console.log(error.message);
alert(error.message)
}
);
Great post! Very informative and clearly explained. Thanks for sharing such valuable content. If anyone is looking to upskill in Microsoft Dynamic CRM, we offer comprehensive Microsoft Dynamics CRM Online Training with hands-on experience. Feel free to check it out!
ReplyDelete