Hello team,
Am getting below error when calling setwordtemplate using custom workflow. Please guide.
Code Snippet:
OrganizationRequest req = new OrganizationRequest("SetWordTemplate");
req["Target"] =
new EntityReference("new_testbhp", new Guid(recordGuid));
req["SelectedTemplate"] =
new EntityReference("documenttemplate", new Guid(docTemplateGuid));
service.Execute(req);
Exception in custom workflow
Message: The request SetWordTemplate cannot be invoked from the Sandbox.
at Microsoft.Crm.Sandbox.SandboxCodeUnit.ProcessException(Exception originalException, IExecutionContext context, SandboxClient client, SandboxCallTracker callTracker, Boolean isSafeToRetry, DateTime performanceExecutionStartTime, SandboxTracker tracker, Guid parentExecutionId, CrmException& crmException, String& assemblyContents)
at Microsoft.Crm.Sandbox.SandboxCodeUnit.<>c__DisplayClass24_0.<Execute>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePluginContainer.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Workflow.Services.ProxyCustomActivity.Execute(CodeActivityContext executionContext)
-- End stack trace --