Hi folks,
So just wanted to ask a quick question about retrieving a contact's specific form-type when calling the Dynamics Web API from the root url <name>.crm.dynamics.com/api/data/v9.1
However, in the Health 365 portal, contacts can be viewed from a couple of different views - as "patients" in Patient 360, as "practitioners" in Physician 360, or just as a plain old Contact (see image below)
I want to make a Get request to this contact from the Physician 360 view - because there are values in that view that are not accessible when calling just as a simple contact.
When I look at the URL in the web browser when in this view, I noticed that the value for "formid" changes depending on the different views described above. (See URL Below)
When I want to find a specific contact, just as a contact, I call https://______.crm.dynamics.com/api/data/v9.1/contacts(5b1######-#######-######)
My question is simply this - how can I make a REST Call (Get request) like the link above for this contact but also pass that form id in with it?
Thank you so much for any and all feedback!!
*This post is locked for comments
Hi partner,
You could try call this client API "Xrm.WebApi.retrieveRecord" to get contact fields.
I retrieved more fields from this than call Org URL with entity id directly.
Entity: Contact.
Available fields in Customization: 192
Fields from Org URL directly: 200.
Fields from WebAPI call: 246.
Any Customization field: No
Sample code:
Xrm.WebApi.retrieveRecord(
Xrm.Page.data.entity.getEntityName(), Xrm.Page.data.entity.getId().replace('{','').replace('}','')).
then(
function success(result) {
JSON.stringify(result);
},
function (error) {
console.log(error.message);
}
);
Regards,
Clofly
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156