Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

How to get a record from Dataverse via Javascript in Power Portal?

(0) ShareShare
ReportReport
Posted on by 185

Hi Everyone,
I am currently working with Power Portal Javascript.
My requirement is, I want to get a record from Dataverse via Javascript.
For Eg.- In D365 we use XMLHttpRequest.

Can anyone please he with this?
Thanks

  • Suggested answer
    - Matt Bayes - Profile Picture
    890 on at
    RE: How to get a record from Dataverse via Javascript in Power Portal?

    Hi Jishnu,

    To elaborate on Akshay's response:

    You can build out a Web Template using liquid to retrieve the record from the Dataverse. You can modify the return type to be JSON, set on the field in the Web Template at the bottom of the form. You will need to accept some sort of parameter to filter the specific record you want to retrieve.

    Once that is built, you can then build out a web page that has the page template attached to the web template. This will allow you to give it a specific URL to call from your JS code.

    When the web page is built, you can use an AJAX or HTTP request to call your liquid service at that specified URL, pass it the parameter (probably the GUID of the record you want) and it will bring it back in JSON format.

    Colin Vermander has an excellent blog about this approach: https://colinvermander.wordpress.com/2017/04/17/dynamics-365-portals-use-liquid-to-return-json-or-xml/

    Alternatively, with the more recent versions of the Powerapps Portals, we now have the ability to utilize Portals Web APIs. There are some limitations and requirements around this, however, it allows us to use CRUD operations directly from JS. You can find out about this here: https://docs.microsoft.com/en-us/powerapps/maker/portals/web-api-overview

    If you have any questions please let me know! I'd appreciate if you would mark this as answered if I was able to solve your issue!

    Thanks!

    Matt Bayes

  • CrmAkshay Profile Picture
    10 on at
    RE: How to get a record from Dataverse via Javascript in Power Portal?

    Hello Jishnu,

    You can get data using fetch xml in liquid script

    Thanks & Regards,

    Akshay Shah

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 95

Overall leaderboard

Product updates

Dynamics 365 release plans