Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Unable to register Custom Workflow for Opportunity to task

Posted on by Microsoft Employee

Hi All,

I am working on custom workflow for opportunity to task. I wrote C# code and build the solution. When i am trying to register workflow in plugin registration tool, i am facing issue. Below is the error message.

Please someone can help me it would be very useful.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Invalid CrmReferenceTarget: The entity Opportunity doesn't exist. Property: Opportunity
Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
  <ActivityId>21031321-ec0a-45b1-a8a3-32bf3c787ed6</ActivityId>
  <ErrorCode>-2147200995</ErrorCode>
  <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
  <Message>Invalid CrmReferenceTarget: The entity Opportunity doesn't exist. Property: Opportunity</Message>
  <Timestamp>2017-02-16T13:24:07.1494607Z</Timestamp>
  <ExceptionSource i:nil="true" />
  <InnerFault>
    <ActivityId>21031321-ec0a-45b1-a8a3-32bf3c787ed6</ActivityId>
    <ErrorCode>-2147200995</ErrorCode>
    <ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>Invalid CrmReferenceTarget: The entity Opportunity doesn't exist. Property: Opportunity</Message>
    <Timestamp>2017-02-16T13:24:07.1494607Z</Timestamp>
    <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()


*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to register Custom Workflow for Opportunity to task

    Please share the screenshot of the values you put when you try to register the workflow. Please make sure your entity name is opportunity in code and in Plugin registration tool.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Unable to register Custom Workflow for Opportunity to task

    Hi Laxman,

    You can handle this issue by getting the GUID of the record from the context and then retrieve the value of opportunity id attribute.

    See the link below.

    nishantrana.me/.../invalid-crmreference-target-the-entity-customer-doesnt-exist

    Hope this helps.

  • Suggested answer
    Bas van de Sande Profile Picture
    Bas van de Sande 4,383 on at
    RE: Unable to register Custom Workflow for Opportunity to task

    Hi Laxman,

    the error message contains the solution:

    Invalid CrmReferenceTarget: The entity Opportunity doesn't exist.

    Did you verify the casing of the entity name, as the naming is case sensitive.

    I hope this helps you forward

    Bas

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans