我正在尝试获取*customerid*
不为空的发票列表。我从高级查找生成 fetchxml 查询,然后放入 XRMServiceToolkit 的函数中,但它引发以下异常。
例外
Error Code:-2147220989 Message: An exception System.FormatException was thrown while trying to convert input value 'not-null' to attribute 'invoice.customerid'. Expected type of attribute value: System.Guid. Exception raised: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
代码片段
这是我的代码片段。
function getinvoices()
{
var query = "<fetch mapping='logical' >"+
"<entity name='invoice'>"+
"<attribute name='name' >"+
"<attribute name='customerid' >"+
"<attribute name='statuscode' >"+
"<attribute name='totalamount' >"+
"<attribute name='invoiceid' >"+
"<order attribute='name' descending='false' >"+
"<filter type='and'>"+
"<condition attribute='customerid' operator='not-null' >"+
"</filter>"+
"</entity>"+
"</fetch>";
var retrievedInvoices = XrmServiceToolkit.Soap.RetrieveMultiple(query);
alert(retrievedInvoices.length);
}