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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

An error has occurred/Invalid Pointer on custom workflow activities

(0) ShareShare
ReportReport
Posted on by 16

Hi,

We are on CRM 2011 On Premise.  We are getting several different errors when running a standard workflow that contains a custom workflow activity when a phone call is created.  When the phone calls are created in bulk, the workflow only succeeds for some, but pauses in a "waiting" state and gives the following errors on all others:

An error has occurred.
A SQL error has occurred.
Invalid Pointer.

Details of all errors are:

System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #CDA8829B

 

ValidateOpen - Encountered disposed CrmDbConnection when it should not be disposed

 

ValidateClosed - Db GetCreateConnection() should be closed on End

 

Generic SQL error.

 

VerifyCommitted - Transaction has not been committed

 

An unexpected error occurred.

If we resume the "waiting" workflows one by one, they succeed just fine.  The issue only happens when the phone calls are created in buik.  After reading several articles online, we added the following registry keys to both the crm and async server, rebooted and attempting to try the workflow again.  Same errors.

Added these keys to the HKLM\Sofware\Microsoft\MSCRM folder:

DWORD OLEDBTimeout = 300000 (decimal)
DWORD ExtendedTimeout = 1000000 (decimal)
DWORD NormalTimeout = 1000000 (decimal)

Any ideas on how to resolve this issue?  It seems like they are common errors other crm users have experienced when using custom plugins or custom workflow activities.

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Martin Donnelly Profile Picture
    1,030 on at
    RE: An error has occurred/Invalid Pointer on custom workflow activities

    One side issue is transmitting strings within XML.  I had a similar issue that turned out to be an apostrophe (') within a company name where I had failed to convert it to web consumable.  Sorry I don't have the syntax on the tip of my fingers.

  • Alejandro Cesetti Profile Picture
    205 on at
    Re: An error has occurred/Invalid Pointer on custom workflow activities

    Hi cd09,

    Are you defining context variables (IOrganizationService, IExecutionContext, etc.) as global in the custom workflow activity?

    Ale

  • cd09 Profile Picture
    16 on at
    Re: An error has occurred/Invalid Pointer on custom workflow activities

    Close to 200 phone calls are created at once.  They are created via a nightly service.  I was thinking about breaking the process up so it only creates 25 or so at a time.  However, when I was testing I noticed the workflow was failing(pausing due to error) even if its triggered on less than 10 phone calls at a time.

  • Gus Gonzalez Profile Picture
    27,113 on at
    Re: An error has occurred/Invalid Pointer on custom workflow activities

    I was thinking that you are creating those two related records via Script...that's why I mentioned adding a timer on the script itself but then I think the problem is more about overloading the server...how many phone call activities are being imported at once when the system fails?

  • cd09 Profile Picture
    16 on at
    Re: An error has occurred/Invalid Pointer on custom workflow activities

    Do you mean in the standard workflow portion of it?  I could add a wait statement before the custom workflow activity starts.  They will all still trigger a the same time though

  • Gus Gonzalez Profile Picture
    27,113 on at
    Re: An error has occurred/Invalid Pointer on custom workflow activities

    Can you add "wait" values to the code?

  • cd09 Profile Picture
    16 on at
    Re: An error has occurred/Invalid Pointer on custom workflow activities

    The workflow only triggers on Phone Call creation and then the custom workflow activity creates a record that links to the phone call in addition to creating some other records which link to it.  So we can't really test on any other entity.  I did try to create this process as much as I could all in a standard workflow, fired it on multiple phone calls and they all succeeded just fine. Not sure what needs to change in the custom workflow activity to ge this to work.

  • Gus Gonzalez Profile Picture
    27,113 on at
    Re: An error has occurred/Invalid Pointer on custom workflow activities

    Does it fail to create any other records in Bulk or is it only for Phone Calls?

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans