Workflow Error with Email
Posted Friday, January 16th, 2009
A client was experiencing an error when creating a workflow that will have the functionality of sending an email. When you click the Set Properties button, an exception is thrown. Screen shots from the UI are below. The Event Log shows:
“InvalidOperationException: Operation is not valid due to the current state of the object.”
I found this answer and it works.
This is a known bug in Microsoft Dynamics CRM 4.0. It occurs on an organization migration whenever reports exist using Notes as the main entity. There is a hotfix in the works.
Current workaround:
This will find any reports using Notes for the main entity:
SELECT * FROM ReportEntity WHERE ObjectTypeCode = 5
If a GUID is returned, it means there is a report that is using Notes as a primary entity. In that case, do the following:
a. Copy the GUID id.
b. Open a report and then Press F11 twice until you get the address bar.
c. Replace the report guid with the one from the Query and press Enter.
d. In Microsoft CRM, select the Report from the list and then Click Edit Report on the Menu bar on top.
e. Go to the Categorization Section and the Related Record Type line, click the “…” button and add value. Save the report.
f. Open the same report and then remove the Related Record that you added. You should be able to create the workflow with email now.




