2
我創建的Microsoft Dynamics插件CRM 4,將根據另一查找字段的值更改帳戶實體的所有者更改帳戶的所有者對CRM 4.0。現在我已經設法獲取將充當帳戶「所有者」的用戶的GUID。到現在爲止還挺好。 我嘗試更改所有者時出現問題。我正在嘗試使用AssignRequest,但它不起作用。當我嘗試執行請求時,我在C#調試器上得到一個SoapException,並且webservice輸出一個對話框: 「請求的記錄未找到或者您沒有足夠的權限查看它」嘗試使用插件
以下是我正在使用的代碼:
TargetOwnedAccount target = new TargetOwnedAccount();
SecurityPrincipal assignee = new SecurityPrincipal();
assignee.Type = SecurityPrincipalType.User;
assignee.PrincipalId = context.InitiatingUserId;
target.EntityId = ownerGuid; //this is the GUID I am retrieving from the other lookup field
AssignRequest assign = new AssignRequest();
assign.Assignee = assignee;
assign.Target = target;
AssignResponse res = (AssignResponse)crmService.Execute(assign); //this is where i get the exception
我希望我沒有遺漏任何東西。 任何幫助將不勝感激:) 謝謝
它往往是有益採取暫停和回踩了一會兒;) – ccellar 2012-07-31 08:48:34
是的,你說得對:P – Pawcu 2012-07-31 13:26:52