Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Odata query response

(0) ShareShare
ReportReport
Posted on by 15

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>
        
  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Odata query response

    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

  • 7and40 Profile Picture
    7and40 15 on at
    RE: Odata query response

    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.

  • 7and40 Profile Picture
    7and40 15 on at
    RE: Odata query response

    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.

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Odata query response

    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

  • Blitzey Profile Picture
    Blitzey 370 on at
    RE: Odata query response

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

    Where is your external DB hosted, assume Azure?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans