To delete a record, we can use the syntax below. For example, to delete an account:
[sourcecode language=”JavaScript”] var Id = "26d4ad90-44d1-ea11-a812-000d3a377e2b"; // your record to deleteXrm.WebApi.online.deleteRecord("account", Id).then(
function success(result) {
console.log("Record deleted");
},
function(error) {
Xrm.Utility.alertDialog(error.message);
}
);
[/sourcecode]

Keep learning. Keep building.
Explore AI, agents & Microsoft technology.
I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.
Subscribe on YouTube →Carl de Souza Enterprise Architect at Microsoft · AI Technology Expert
