web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 151 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 51 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans