Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Error when calling a custom workflow activity from the Action-An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute):

Posted on by 55

Hello Experts,

I am getting the below exception sporadically while calling a custom workflow activity from the Action and sending the input parameters to the actions.

It would be great anyone can help with this.

Exception type: Microsoft.Crm.Workflow.Services.InvalidCustomActivityExecutionException
Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute):

Below is the Process session log info :

Sync workflow failed with error message - Exception type: Microsoft.Crm.CrmException
Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): D365.Workflows.OpportunityWorkflow.PaymetricWF: System.Exception: Object reference not set to an instance of an object.
at Microsoft.Xrm.RemotePlugin.Client.Interceptors.SandboxFabricClientTelemetryInterceptor.<>c__DisplayClass3_0.<Intercept>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.Client.Interceptors.SandboxFabricClientTelemetryInterceptor.Intercept(IInvocation invocation, IExecutionContext context, SandboxFabricCallTracker sandboxFabricCallTracker)
at Microsoft.Xrm.RemotePlugin.Client.Interceptors.SandboxFabricCodeUnitExecuteBaseInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.ISandboxFabricCodeUnitProxy.Execute(ILifetimeScope scope, IExecutionContext context, SandboxFabricCallTracker& sandboxFabricCallTracker)
at Microsoft.Xrm.RemotePlugin.Client.SandboxFabricPlugin.<>c__DisplayClass5_1.<Execute>b__3()
at Polly.Policy.<>c__DisplayClass150_0`1.<Execute>b__0(Context ctx, CancellationToken ct)
at Polly.Policy.<>c__DisplayClass143_0`1.<ExecuteInternal>b__0(Context ctx, CancellationToken ct)
at Polly.RetrySyntax.<>c__DisplayClass12_1.<WaitAndRetry>b__1(Context ctx, CancellationToken ct)
at Polly.Retry.RetryEngine.Implementation[TResult](Func`3 action, Context context, CancellationToken cancellationToken, IEnumerable`1 shouldRetryExceptionPredicates, IEnumerable`1 shouldRetryResultPredicates, Func`1 policyStateFactory)
at Polly.RetrySyntax.<>c__DisplayClass12_0.<WaitAndRetry>b__0(Action`2 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.ExecuteInternal[TResult](Func`3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Execute[TResult](Func`3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Execute[TResult](Func`1 action)
at Microsoft.Xrm.RemotePlugin.Client.SandboxFabricPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Xrm.RemotePlugin.Client.ResilientSandboxPlugin.<>c__DisplayClass11_1.<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.Client.ResilientSandboxPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePlugin.RemotePluginExecute(IServiceProvider serviceProvider, ILifetimeScope lifetimeScope, IExecutionContext executionContext, ILogger logger)
at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Workflow.Services.ProxyCustomActivity.Execute(CodeActivityContext executionContext)
-- End stack trace --

Exception type: Microsoft.Crm.Workflow.Services.InvalidCustomActivityExecutionException
Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): D365.Workflows.OpportunityWorkflow.PaymetricWF: System.Exception: Object reference not set to an instance of an object.
at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)
-- End stack trace --

, error code - -2147220891

Thanks

Srikanth

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: Error when calling a custom workflow activity from the Action-An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute):

    Hi,

    It looks like the error occurs in the custom workflow: D365.Workflows.OpportunityWorkflow.PaymetricWF

    Please share the workflow code and the action that calls for the custom workflow

  • Suggested answer
    Nya Profile Picture
    Nya 29,056 on at
    RE: Error when calling a custom workflow activity from the Action-An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute):

    Hi Srikanth,

    Please refer to the following documentation, which trouble shoots the error with the same error code:

    Troubleshoot plug-ins (Microsoft Dataverse for Apps) - Power Apps | Microsoft Docs

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans