Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Replicate CRM xRM API on Portals

Posted on by Microsoft Employee

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

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Replicate CRM xRM API on Portals

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans