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)

Query CRM from Portal via Javascript

(0) ShareShare
ReportReport
Posted on by

Hello, 

is there a way to query (RetrieveMultiple ect...) the CRM via Javascritp from a page of the Portal?

Thanks in advance.

Best regards.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi,

    Please add on skype :- mahesh.variance

    We will discuss in detail if possible from your side.

    Thanks

    Mahesh

  • Suggested answer
    Dynamics_Alok Profile Picture
    1,746 on at

    Yes ..You can execute RetrieveMultiple etc using javascript .There is nice and easy way to achieve this using WebAPI .Other nice resource is https://community.dynamics.com/crm/b/mscrmcustomization/archive/2016/10/18/ms-crm-2016-web-api-operations-retrieve-single-or-multiple-records .

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Alok's link is for native CRM forms - not the portal.

    You can query CRM using Microsoft portals' own WebAPI endpoint - see community.adxstudio.com/.../entity-list-odata-feeds

    Your other option is to query fetchxml using the liquid template server side - community.adxstudio.com/.../68465eea-2806-e611-9407-000d3a10c65c

    Hope this helps

  • Fubar Profile Picture
    2,761 on at

    Just to add to Scott's liquid template suggestion.  You can create a Web Page based on the template and then call that page via Ajax (if it really has to be something that is dynamic) and process the results in Ajax.

  • Luca Genovese Profile Picture
    on at

    Hello Scott,

    am I able, with fetchxml, to query every entity (eg custom entities). In the link it's said that I need appropriate entity permissions. Is the Read permission on the Portal enough?

    Best regards.

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Luca,

    Check this article - uds.systems/.../how-to-run-custom-code-in-dynamics-365-portal

  • Luca Genovese Profile Picture
    on at

    Hello Andrii,

    I tried to insert the fetch inside the page but I'm always getting this error:

    Liquid error: Data at the root level is invalid

    The fetch is correct.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Luca,

    Try to get in touch with author of blog post to ask for a help. I have seen the article but have never used it before.

  • Verified answer
    Summer Garg Profile Picture
    585 on at

    Hi Luca,

    To use JS on portal, check this article.......

    crmhub.blogspot.in/.../how-to-use-java-script-in-adx-studio.html

    To retrieve the data, we can use OData query......check this article on this.......

    crmhub.blogspot.in/.../retrieve-data-using-odata-query-in-d365-Portal-ADX-Studio-Portal.html

  • Community Member Profile Picture
    on at

    unable to access both the link from any browser. Please share valid links

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