web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Custom Action returns with Error

(0) ShareShare
ReportReport
Posted on by

 Hey Guys,

Quick Question regarding my custom action for creating an incident:

I have this code which has been tested last week and went fine.

OrganizationRequest request = new OrganizationRequest("ise_contact_newincident_ca");
request.Parameters.Add("Target", xContactReference);
request.Parameters.Add("title", xParamList.vString("title"));
request.Parameters.Add("description", xParamList.vString("description"));

OrganizationResponse xResponse = xProxy.Execute(request);

Today am using exactly the same piece of code again and what I get is:   

StackTrace.PNG

And if I open the process in CRM and go to process"meetings" (Don't know if it's the actual translation ^.^)

And I get:


2072.Process.PNG

Do you know what could have happened there?
Or where I could get some more information about this error?

*This post is locked for comments

I have the same question (0)
  • Bas van de Sande Profile Picture
    4,383 on at

    Hi Luca,

    do you have the opportunity to start a remote debugging session on the CRM server?

    that way you can easily track your error.

    is it possible that you post a bit more code. perhaps you error is being caused by some faulty data

    Bas

  • Community Member Profile Picture
    on at

    Hey, I have found something more:

    Sync workflow failed with error message - Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.Detail:

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

     <ErrorCode>-2147220970</ErrorCode>

     <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

     <Message>An unexpected error occurred.</Message>

     <Timestamp>2015-05-04T09:20:28.0569221Z</Timestamp>

     <InnerFault>

       <ErrorCode>-2147220970</ErrorCode>

       <ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

       <Message>System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #985CD8C6</Message>

       <Timestamp>2015-05-04T09:20:28.0569221Z</Timestamp>

       <InnerFault i:nil="true" />

       <TraceText i:nil="true" />

     </InnerFault>

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

      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)

    , error code - -2147220970

    So and this is the overview:

    processerror.PNG

    So it already fails at the Create step..
    But the ContactReference I'm entering as Target Parameter vor the Custom Action is fine.

  • Verified answer
    Bas van de Sande Profile Picture
    4,383 on at

    Hi Luca,

    It looks like you are doint a wrong type cast --> error message: System.InvalidCastException

    as target parameter, are you receiving a Guid?

    you should check if the Guid not is null and that you are passing it as a new entityreference("entityname", your guid) to the entity you are creating

    Hope this helps a bit

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans