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 :
Customer experience | Sales, Customer Insights,...
Answered

Odata Query for CRM Portal Entity Form

(0) ShareShare
ReportReport
Posted on by 242

HI,

I created entity form but i want to query data in entity form can we retrieve data using odata or any other solution in entity form in crm portal?

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can check following video:

  • cloflyMao Profile Picture
    25,210 on at

    Hi rocky,

    The prerequisite is that your page template type is Web Template if you would like to query data by odata, 

    because we need javascript to query data with odata, and we could only run custom javascript on web template type page template.

    On the other hand,  we need to create an Entity List and enable odata option for the list to query data.

    1. Add entity list and entity form to our custom web page.

    pastedimage1577672076195v1.png

    2. In OData Feed tab, select a view as entity data set, we could only get entity fields data from all available columns of the view;

    then give our data set a custom name.

    This screenshot indicates that I can only retrieve open leads in CRM.

    pastedimage1577672642540v4.png

    I can only retrieve fullname, topic, status reason and created on fields data.

    pastedimage1577672511949v3.png

    3. In the web template, we can render a entity form by 

    {% entityform name: 'entity form Name' %}

    query data URL syntax:

    https://portalURL/_odata/entitysetName

    Due to Bootstrap and jQuery have been integrated in Portal, so we can create a custom page with 

    entity form, entity list with style easily, below is my demo web template code:


    {% entityform name: 'New Lead Fom v1' %}

    Here are some existing leads..

    pastedimage1577673226001v5.png

    Next, you could enable entity permission of entity list for your exposed records to portal users with specific web role,

    or filter you records again with odata parameters:

    https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-list/entity-list-odata-feeds/

    or set a maximium number as possible for Page Size(also in entity list), then do custom pagination with 3rd party javascript plugins by yourself.

    Regards,

    Clofly

  • madiri Profile Picture
    242 on at

    HI Andrew, I Tried this but when i tried with odata like this _odata/pricelistitems?$select=amount&$filter=pricelevelid%20eq%20%20(guid%2733e987d7-462a-ea11-a810-000d3a35b480%27)%20and%20productid%20eq%20(guid%2732cac306-472a-ea11-a810-000d3a35b480%27) its getting error Could not find a property named 'pricelevelid' on type 'Xrm.pricelistitems'.

  • madiri Profile Picture
    242 on at

    I  have product id and pricelist id i need to getting amount from pricelistitems using odata can you help on this

  • cloflyMao Profile Picture
    25,210 on at

    Hi

    Please check whether they are logical name for fields pricelevelid and productid.

    Try to list all records without parameters to see correct field format.

  • madiri Profile Picture
    242 on at

    HI cloflyMao ,

    Yes logical name are correct can you check my odata from your side with changing product id and pricelist in pricelistitem entity.I am using Pricelist and Pricelistitems default entity

  • cloflyMao Profile Picture
    25,210 on at

    Hi rocky,

    You should use following parameters format to filter records with 2 lookup fields id.

    _odata/existingleads?$filter=parentcontactid/Id eq (guid'63a0e5b9-88df-e311-b8e5-6c3be5a8b200') and parentaccountid/Id eq (guid'c2a19cdd-88df-e311-b8e5-6c3be5a8b200')

    pastedimage1577761240882v1.png

    And $select is not supported from the link in my first response, you should instead use pricelistitems.value[0.amount.

    Regards,

    Clofly

  • madiri Profile Picture
    242 on at

    Thank you Andrew

  • cloflyMao Profile Picture
    25,210 on at

    Hi rocky,

    Could you kindly also mark my answer as verified if you had gotten result from my last response?

    It would be really appreciated. :)

    Regards,

    Clofly

  • madiri Profile Picture
    242 on at

    I tried to mark answer its not able to give green tick to second answer

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans