Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

An error has occurred/Invalid Pointer on custom workflow activities

(0) ShareShare
ReportReport
Posted on by 2

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

  • Martin Donnelly Profile Picture
    Martin Donnelly 1,010 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
    Alejandro Cesetti 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
    cd09 2 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
    Gus Gonzalez 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
    cd09 2 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
    Gus Gonzalez 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
    cd09 2 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
    Gus Gonzalez 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

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! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans