We all know that if we call a child workflow from a parent real-time workflow, it runs in context of that parent workflow but what happens if the trigger for the parent real-time workflow is updated using a custom application outside of CRM?
I had a custom .Net application which used to get values from CRM, send them to SAP and update the return values from SAP back into CRM. The custom application used to trigger as an batch application. There was a real-time workflow configured on update of the fields populated by the .Net application in CRM which internally used to call a child workflow process.
One day issue was reported by the .Net application as “[Microsoft.Xrm.Sdk.OrganizationServiceFault]: This workflow cannot run because one or more child workflows it uses have not been published or have been deleted. Please check the child workflows and try running this workflow again. (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).”.
As the .Net application used to update the field which then used to trigger the real-time workflow (configured to run “After”) it was not quite obvious behavior for me. I did know that the child workflow was deactivated but my assumption was that the issue will be logged in system jobs and not in .Net application. I was expecting that .Net application will update the field in CRM, after which the parent real-time workflow will trigger which will try to call a deactivated child workflow and fail.
But after digging a bit it was observed that as the parent workflow was configured as real-time it keeps the context with calling .Net application and returns the error back to .Net application. Due to which the .Net application throw an exception. I’m still not sure why, but this is how it works.
|***[Referencing to Microsoft Dynamics CRM Team Blog]
Check out the new documentation for Microsoft Dynamics CRM Online 2015 Update 1 (7.1.0).
What’s new in this update
Everything you need to learn about – and prepare for – the new features is on these pages:
Information for IT pros, administrators, implementers, and customizers
For CRM administrators and customizers, this update includes:
Information for developers
For developers this update includes:
All new code samples for this update are available on MSDN Developer code samples:
We are in the process of migrating our codes samples out of the downloadable SDK package and make them available online so that they can be discovered more easily.
Finally, please visit the new responsive Microsoft Dynamics CRM Developer center at http://crmdevelopercenter.com/. Be sure to try the new search, which is filtered to return only MSDN library content from the Microsoft CRM SDK
Information for end-users
For end-users, this update includes new topics and updates to the Training & Adoption Kit.
- New Mobile User’s Guide – Find out how to install the new phone app, work offline, and manage your leads through the sales process
- Updated Training & Adoption Kit! The popular, easy-to-customize PowerPoint source files are right here – all ready for you to use for your own training, presentations, and webinars.
Enjoy the new features!
We hope this new content gets you going on all the new features of this online update.
As always, you can find your way to all documentation by visiting the central portal for all the CRM content sites: the CRM Help Center.
Let us know in the blog comments what you think of the new content – of if there’s something else you need. Give feedback to the Documentation Team at any time.