D365 Xrm Web API Retrieve Single Record
Xrm web Api to retrieve single record from the dataverse table.
Below is the Example to retrieve the single record from the user table.
function getRecord(){
var recordId = "f859482a-059e-ed11-aad0-6045bd1d06b2"
Xrm.WebApi.retrieveRecord("systemuser", recordId).then(
function success(result) {
console.log(result);
// Columns
var systemuserid = result["systemuserid"]; // Guid
},
function(error) {
console.log(error.message);
}
);
}
In Above example
"sustemuser" - Table Name
"recordId" - GUID of current Record
Here in the above example you can retrieve the record from the user table, you have to pass the 'GUID' of the user record.
If Anything is required Please Leave a Comment.