Sales Order Details and Rest Functions

Nov 6, 2012 at 11:22 PM

is it possible with the Rest Functions in this toolkit to pull in the Product Name and Product quantity of each item in the sales order product or salesorderdetailset for a given order. I tried to plug in a guid of a sales order record and put the sales orderdetailset in there but in gives a Error 404 Not Found Resource not found for the segment.

 

 function order ()
{
var salesid = "14273a6b-8e01-e211-857b-005056b60057"
XrmServiceToolkit.Rest.Retrieve(
                salesid,
                "SalesOrderDetailSet",
                null, null,
                function (result) {
                                        equals(Id, accountId, "Retrieve() ");
                },
                function (error) {
                    equal(true, false, error.message);
                },
                false
            );
}

 

 

Coordinator
Nov 16, 2012 at 8:55 AM

Hi.

SaleOrderDetailsSet could contain many record for an order in CRM.

I would recommend using retrievemultiple method instead.

To search for details for field and entity name (they are case-sensitive when using REST), you could using the http://crm2011odatatool.codeplex.com/ tool to generate the query and put them in the code.

Hope this helps.

Jaimie