Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Got "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation" error when Registering a Custom Workflow

(0) ShareShare
ReportReport
Posted on by 135

I am using CRM on-premise,  I have no problem to register a new plugin, but I got this error when I registering a  new custom Work flow.

"Exception retrieving custom activity info - Exception has been thrown by the target of an invocation"

I selected Isolation mode to "Sandbox", and Specify location to "Database",

Does anybody know what is wrong with my Registration process?

  • Suggested answer
    Peter Cong Profile Picture
    Peter Cong 135 on at
    RE: Got "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation" error when Registering a Custom Workflow
    [quote user="Peter Cong"]

    I am using CRM on-premise,  I have no problem to register a new plugin, but I got this error when I registering a  new custom Work flow.

    "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation"

    I selected Isolation mode to "Sandbox", and Specify location to "Database",

    Does anybody know what is wrong with my Registration process?

    [/quote]

    Thanks a lot for all help, this issue is resolved. the issue was caused by the version of .NET framework selected to create Custom workflow activity was using the high version number: 4.8, instead, I have to choose 4.5.2 version to match the current on-premise version my company is using. And the associated reference files Microsoft.workflow must choose lower version number (7.xxx), Not 9.0 version to make it compatible.

  • Verified answer
    sdfasdf Profile Picture
    sdfasdf 840 on at
    RE: Got "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation" error when Registering a Custom Workflow

    Hello,

    I would encourage you to collect platform traces while experimenting this issue to review the call stack. To enable tracing, please refer to this article: support.microsoft.com/.../how-to-enable-tracing-in-microsoft-dynamics-crm

    Once you get the platform traces, you can correlate the error message you got in Plugin Registration Tool via ActivityId and the time stamp. That should point you in the right direction to fix the issue.

  • Peter Cong Profile Picture
    Peter Cong 135 on at
    RE: Got "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation" error when Registering a Custom Workflow

    can anybody help please? thanks

  • Peter Cong Profile Picture
    Peter Cong 135 on at
    RE: Got "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation" error when Registering a Custom Workflow

    Hi Bipin, thanks a lot for your help,

    I had checked that, there is not other assemblies with same name. The error occurred when registering a custom workflow at the beginning first time. not sure how to check reference. I have no issue to register a new plug in.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: Got "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation" error when Registering a Custom Workflow

    Hi,

    Check below points.

    Make sure other assemblies doesn’t have the same name

    Sometime, Assembly which u tried to register get failed but the reference will be there. Unregister the reference and try again.

    Still, Try changing the major version of the assembly and register

    bidynamics365.com/

    Please mark my answer verified if i were helpful

  • Peter Cong Profile Picture
    Peter Cong 135 on at
    RE: Got "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation" error when Registering a Custom Workflow

    here is the details error message:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Exception retrieving custom activity info - Exception has been thrown by the target of an invocation.

    Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">

     <ActivityId>77be9dbf-0c0c-41aa-a0ea-1f0cbfc886a5</ActivityId>

     <ErrorCode>-2147200995</ErrorCode>

     <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />

     <HelpLink i:nil="true" />

     <Message>Exception retrieving custom activity info - Exception has been thrown by the target of an invocation.</Message>

     <Timestamp>2020-09-23T19:27:06.1668068Z</Timestamp>

     <ExceptionRetriable>false</ExceptionRetriable>

     <ExceptionSource i:nil="true" />

     <InnerFault>

       <ActivityId>77be9dbf-0c0c-41aa-a0ea-1f0cbfc886a5</ActivityId>

       <ErrorCode>-2147200995</ErrorCode>

       <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />

       <HelpLink i:nil="true" />

       <Message>Exception retrieving custom activity info - Exception has been thrown by the target of an invocation.</Message>

       <Timestamp>2020-09-23T19:27:06.1668068Z</Timestamp>

       <ExceptionRetriable>false</ExceptionRetriable>

       <ExceptionSource i:nil="true" />

       <InnerFault i:nil="true" />

       <OriginalException i:nil="true" />

       <TraceText i:nil="true" />

     </InnerFault>

     <OriginalException i:nil="true" />

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

    Server stack trace:

      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:

      at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterPlugin(CrmOrganization org, CrmPlugin plugin)

      at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans