Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How can I specify the specific formID for a contact in the Health 365 CRM Portal?

Posted on by 10

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)

pastedimage1564063197382v1.png

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)

https://___crm.dynamics.com/main.aspx?appid=_____________&pagetype=entityrecord&etn=contact&id=#####-######-#####-####d&formid=e9486f9f-8013-4a53-9c85-c9f59515a185

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

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: How can I specify the specific formID for a contact in the Health 365 CRM Portal?

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans