Cool. Thanks efefher.
Throughout the weekend, I have created the two ways to get the access token. Both ways can get the token but since the restclient is an additional assemblies, I tried to use httpclient instead.
1. Restclient
2. httpclient
- Then, I created a WF to trigger the httpclient plugin, the plugin able to get token (see the trace), but has error message as below and CRM keep retry in minute. Any suggestion on that?
- Also, do you suggest a good guideline for using ILMerge?
- After getting the token, I want to get user href, and update Metric value in Hoopla.
How do you coding with that?
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected exception from plug-in (Execute): Interactive.MSCRM.Interactive.WF.UpdateTopOppuntity: System.TimeoutException: Couldn’t complete execution of the custom activity Interactive.MSCRM.Interactive.WF.UpdateTopOppuntity plug-in within the 2-minute time limit.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>6afdd71e-462b-4505-a33f-ee6bb3d44912</ActivityId>
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Unexpected exception from plug-in (Execute): Interactive.MSCRM.Interactive.WF.UpdateTopOppuntity: System.TimeoutException: Couldn’t complete execution of the custom activity Interactive.MSCRM.Interactive.WF.UpdateTopOppuntity plug-in within the 2-minute time limit.</Message>
<Timestamp>2017-07-18T13:01:11.6083275Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource>PluginExecution</ExceptionSource>
<InnerFault i:nil="true" />
<OriginalException>System.TimeoutException: Couldn’t complete execution of the custom activity Interactive.MSCRM.Interactive.WF.UpdateTopOppuntity plug-in within the 2-minute time limit.
at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, String customActivityTypeName, IExecutionContext requestContext, Dictionary`2 sandboxServices, Boolean useDrawbridgeEnabled, Boolean chaosFailAppDomain)
at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, String customActivityTypeName, IExecutionContext requestContext, Dictionary`2 sandboxServices, Boolean useDrawbridgeEnabled, Boolean chaosFailAppDomain)
at Microsoft.Crm.Sandbox.SandboxWorker.ExecuteCustomWorkflowActivity(SandboxCallInfo callInfo, SandboxCustomActivityExecutionContext requestContext, Guid pluginAssemblyId, Int32 sourceHash, String assemblyName, Guid pluginTypeId, String pluginTypeName, SandboxRequestCounter& workerCounter, Boolean returnTraceInfo)</OriginalException>
<TraceText>
Hoopla: UpdateTopOpportunity Starting...
Hoopla response:02463911949906ddaa9a9001/c6ea87b62882f25901926e9531d194a815052d626dde045d837ee5b234145ff61c791b417e954c345753aae68e7446812ea115e610c02763ed1ea3903ddc8fc5acb349a5173d1e46c13220c835fffcc6f67d3fa0124359f5920437ed90bb4eaa7d2627fbc31fd15357f5cb1f89446b92094b7123858b110bbb0a5b73f933c6f00dc62c34a17b9ce3e0cf2787ee156b4f319245bc929945a3733526291a48fe8951f5e15a2ff04a/dd63e5e46682fac4417b70b9abb6801b
</TraceText>
</OrganizationServiceFault>
Thanks in advanced.