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,...
Unanswered

Odata query response

(0) ShareShare
ReportReport
Posted on by 17

I am using the below ODATA query to expand the products from salesorderdetails but the query is returning null for all the fields even though the data in present in dynamics.

ODATA query:   /salesorders?$expand=order_details($expand=productid,salesorderid),customerid_account

Below is the response after expanding productid.

Response:  

  •     <productid>
          <validtodate>null</validtodate>
          <importsequencenumber>null</importsequencenumber>
          <productstructure>null</productstructure>
          <productid>122c98ac-b17d-ea11-a811-000d3af3ac9d</productid>
          <_parentproductid_value>null</_parentproductid_value>
          <_createdbyexternalparty_value>null</_createdbyexternalparty_value>
          <producttypecode>null</producttypecode>
          <statuscode>null</statuscode>
          <msdyn_purchasename>null</msdyn_purchasename>
          <iskit>null</iskit>
          <price>null</price>
          <entityimage_url>null</entityimage_url>
          <stockvolume>null</stockvolume>
          <currentcost>null</currentcost>
          <_modifiedonbehalfby_value>null</_modifiedonbehalfby_value>
          <standardcost>null</standardcost>
          <quantityonhand>null</quantityonhand>
          <timezoneruleversionnumber>null</timezoneruleversionnumber>
          <IsReferencedQueryCall>true</IsReferencedQueryCall>
          <new_bvitemid>null</new_bvitemid>
          <quantitydecimal>null</quantitydecimal>
          <_defaultuomid_value>null</_defaultuomid_value>
          <_defaultuomscheduleid_value>null</_defaultuomscheduleid_value>
          <_modifiedbyexternalparty_value>null</_modifiedbyexternalparty_value>
          <modifiedon>null</modifiedon>
          <size>null</size>
          <dmtimportstate>null</dmtimportstate>
          <validfromdate>null</validfromdate>
          <productnumber>null</productnumber>
          <_msdyn_defaultvendor_value>null</_msdyn_defaultvendor_value>
          <entityimage>null</entityimage>
          <name>null</name>
          <_msdyn_transactioncategory_value>null</_msdyn_transactioncategory_value>
          <vendorname>null</vendorname>
          <new_dbms_quickbooks_id>null</new_dbms_quickbooks_id>
          <hierarchypath>null</hierarchypath>
          <price_base>null</price_base>
          <exchangerate>null</exchangerate>
          <entityimage_timestamp>null</entityimage_timestamp>
          <_subjectid_value>null</_subjectid_value>
          <utcconversiontimezonecode>null</utcconversiontimezonecode>
          <description>null</description>
          <statecode>null</statecode>
          <_pricelevelid_value>null</_pricelevelid_value>
          <msdyn_fieldserviceproducttype>null</msdyn_fieldserviceproducttype>
          <isstockitem>null</isstockitem>
          <_createdby_value>null</_createdby_value>
          <standardcost_base>null</standardcost_base>
          <overriddencreatedon>null</overriddencreatedon>
          <msdyn_converttocustomerasset>null</msdyn_converttocustomerasset>
          <producturl>null</producturl>
          <stockweight>null</stockweight>
          <entityimageid>null</entityimageid>
          <_organizationid_value>null</_organizationid_value>
          <_createdonbehalfby_value>null</_createdonbehalfby_value>
          <vendorpartnumber>null</vendorpartnumber>
          <__DisplayName__>Alum Channel 6 x 2 x 9/32</__DisplayName__>
          <msdyn_taxable>null</msdyn_taxable>
          <vendorid>null</vendorid>
          <_transactioncurrencyid_value>null</_transactioncurrencyid_value>
          <traversedpath>null</traversedpath>
          <versionnumber>null</versionnumber>
          <createdon>null</createdon>
          <_modifiedby_value>null</_modifiedby_value>
          <suppliername>null</suppliername>
          <processid>null</processid>
          <currentcost_base>null</currentcost_base>
          <msdyn_upccode>null</msdyn_upccode>
          <isreparented>null</isreparented>
          <stageid>null</stageid>
        </productid>
        
I have the same question (0)
  • Blitzey Profile Picture
    370 on at

    Have you created your own OData 4 endpoint or you using the default OData endpoint?

    Where is your external DB hosted, assume Azure?

  • cloflyMao Profile Picture
    25,210 on at

    Hi 7and40,

    Could you share me how did you expand productid field to get XML format result?

    I think productid would be _productid_value instead, and I run query in address bar directly.

    pastedimage1587373289254v1.png

    Regards,

    Clofly

  • 7and40 Profile Picture
    17 on at

    Yes, I am using default odata endpoint and I am not using any external DB. I am just trying to read the response from dynamics and trying to integrate it with third party application.

  • 7and40 Profile Picture
    17 on at

    currently, I am using the ODATA query: salesorders?$expand=order_details($expand=productid,salesorderid),customerid_account

    I tried querying through URL in browser it is giving the same error.

  • cloflyMao Profile Picture
    25,210 on at

    Hi 7and40,

    Have you added an existing product for your order line record?

    pastedimage1587432631924v2.png

    6648.JPG

    Productid will be null if we use "Write In" type product.

    pastedimage1587432595924v1.png

    In a word, both "existing" and "write in" products will display in subgrid,

    but productid will only display when product of order line is "existing" type.

    Regards,

    Clofly

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 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans