Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 71679

Forum Post: RE: Why I cannot get the GUID for SALESORDERDETAIL?

$
0
0
I understand that part, I just don't know how to extract the GUID id based on the productid. Here's my updated code. var ProductName="Nike Shoes"; QueryExpression qrySOD = new QueryExpression("sal esorderdetail"); string[] cols2 = { "salesorderdetailid", "productid" }; qrySOD.Criteria = new FilterExpression(); qrySOD.Criteria.AddCondition("productid", ConditionOperator.Equal, Guid.Parse(ProductName)); qrySOD.ColumnSet = new ColumnSet(cols2); var sod = _service.RetrieveMultiple(qrySOD); //Casting the reference to GUID Guid salesorderdetailid = (Guid)sod[0].Id; I'm getting the error where the ProductName should be in Guid format (xxxx-xxx etc.,) . Obviously, it's still a string...

Viewing all articles
Browse latest Browse all 71679

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>