Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Query CRM from Portal via Javascript

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Query CRM from Portal via Javascript

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

  • Verified answer
    Summer Garg Profile Picture
    Summer Garg 585 on at
    RE: Query CRM from Portal via Javascript

    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

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Query CRM from Portal via Javascript

    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.

  • RE: Query CRM from Portal via Javascript

    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.

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Query CRM from Portal via Javascript

    Luca,

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

  • RE: Query CRM from Portal via Javascript

    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.

  • Fubar Profile Picture
    Fubar 2,752 on at
    RE: Query CRM from Portal via Javascript

    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.

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: Query CRM from Portal via Javascript

    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

  • Suggested answer
    Dynamics_Alok Profile Picture
    Dynamics_Alok 1,746 on at
    RE: Query CRM from Portal via Javascript

    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 .

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Query CRM from Portal via Javascript

    Hi,

    Please add on skype :- mahesh.variance

    We will discuss in detail if possible from your side.

    Thanks

    Mahesh

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans