Today I am showing how to select an entity record by passing Guid and get back desired fields.
I am running this code on 'Contact' entity and retrieving two fields. I have to remove starting and ending brackets as Web API is not accepting while processing Guids
I am using below javascript code in webresource. For application outside CRM in separate application, u have to first authenticate using Azure / AD depending upon deployment (Online / On-Premises). Refer to this link for this feature.
Code Start:
I am running this code on 'Contact' entity and retrieving two fields. I have to remove starting and ending brackets as Web API is not accepting while processing Guids
I am using below javascript code in webresource. For application outside CRM in separate application, u have to first authenticate using Azure / AD depending upon deployment (Online / On-Premises). Refer to this link for this feature.
Code Start:
function MySelectUsingWebAPI() { var id = Xrm.Page.data.entity.getId(); id = id.replace("{", ""); id = id.replace("}", "");