hi,ender1234
有可能是ColumnSet问题,你用
qlsm.ColumnSet = new AllColumns();
替换掉下面三行
ColumnSet Qlsmcols = new ColumnSet();
Qlsmcols.Attributes = new string[] { "entityid" };
qlsm.ColumnSet = Qlsmcols;
或者用
qlsm.Values = new object[] {lsmGuid };
替换掉下面这行
qlsm.Values = new string[] {lsmGuid.ToString() };
Sorry,手头现在没有环境可以测试,你可以按上面的方法试试.如果还有问题,你可以catch异常的详细信息,再做进一步判断.
try
{
BusinessEntityCollection lsm = crmService.RetrieveMultiple(qlsm);
}
catch(System.Web.Services.Protocols.SoapException ex)
{
Console.WriteLine(ex.Message + ". " + ex.Detail.InnerText);
}