web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Replicate CRM xRM API on Portals

(0) ShareShare
ReportReport
Posted on by

I am trying to replicate that API with a portal address like:

https://my-company.crm.dynamics.com/api/data/v9.0/

When you navigate to that URL you get all your entities information thanks to xRM API.

Now If you add the entity plural name like: https://my-company.crm.dynamics.com/api/data/v9.0/roles then you see all the related info to that entity.

Then I thought in creating the same URL accessible from customer portals, so I have created a web template with an AJAX function like:

const subs = location.pathname.substr(location.pathname.indexOf('api')+3, location.pathname.length) + location.search;

fetch('my-company.crm.dynamics.com/.../v9.0' + subs)
.then(response => response.json());


But I realized that whenever I navigate to the new API URL like my-portal.microsoftcrmportals.com/api I get everything is ok. But if I navigate to  https://my-portal.microsoftcrmportals.com/api/roles I get error 404.

How would you fix this? Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    Why do you want to replicatet this when you can retrieve the data using the inbuilt odata feeds?

    Check below links-

    arpitmscrmhunt.blogspot.com/.../adxstudio-portal-how-to-use-odata.html

    community.dynamics.com/.../using-entity-list-as-odata-feed-dynamics-365-portal

    Hope this helps.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans