locked
CRM4: All Draft Workflows suddenly throwing Object Reference Error RRS feed

  • Question

  • Hi all,

    Something odd is happening with the draft workflows in CRM. When I try to open a draft workflow or any workflow that is not published, I get a CRM Error page that says 'Object Reference Not Set to an Object". Things were fine this morning.

    It all seems to have occurred since a new workflow was deployed and had to be changed. The dll was deleted and then re-added the next day, and then the appropriate step in the workflow rule was re-created. Then it was unpublished, modified, and then republished - and now all draft workflows are showing that error, and I'm not sure why.

    Below is the stack trace. Can anyone make out what might be going on and how to fix it? Thanks

    -jacques :-)


    Stack Trace:
    ---------------------------------------------------------------

    NullReferenceException: Object reference not set to an instance of an object.]
       Microsoft.Crm.Application.Platform.CustomActivityInfoMetadata.GetActivityInfo(Guid pluginTypeId) +714
       Microsoft.Crm.Web.SFA.WorkflowDetailPage.ConfigureCustomActivityStepMenu(CommandBarPopup addStepButton) +456
       Microsoft.Crm.Web.SFA.WorkflowDetailPage.ConfigureWorkflowStepMenu(WorkflowStep workflowStep) +1602
       Microsoft.Crm.Web.SFA.WorkflowDetailPage.ConfigureMenus() +132
       Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) +42
       System.Web.UI.Control.PreRenderRecursiveInternal() +80
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    Friday, March 27, 2009 4:06 PM

Answers

  • Try unregistering the Custom WorkFlow, restart AsyncService and restart IIS. If you can open the WorkFlow designer after this, delete the Custom WorkFlow step from your workflow. And retry the Custom WorkFlow deployment.
    • Proposed as answer by Maruf Wednesday, April 1, 2009 4:36 PM
    • Edited by Maruf Wednesday, April 1, 2009 4:37 PM Edit
    • Marked as answer by DavidJennawayMVP, Moderator Friday, May 29, 2009 12:19 PM
    Wednesday, April 1, 2009 4:33 PM

All replies

  • Hi Jacques,

    Can you add some more information from the trace file? If an exception happens normally you get much more info in the trace file than just the stack trace.
    Saturday, March 28, 2009 11:33 PM
  • I suggest removing the step altogether. Restart the Asynchronous service and see if the error still exists (without the step). If it doesn’t then the problem is directly related to you custom workflow. If it works without the step try to add the custom workflow again to eliminate any metadata issues.

    I would also try to create a new (simple) workflow just to see if new draft workflows are affected. This would help to pinpoint the problem.

    Sunday, March 29, 2009 3:27 AM
  • Try unregistering the Custom WorkFlow, restart AsyncService and restart IIS. If you can open the WorkFlow designer after this, delete the Custom WorkFlow step from your workflow. And retry the Custom WorkFlow deployment.
    • Proposed as answer by Maruf Wednesday, April 1, 2009 4:36 PM
    • Edited by Maruf Wednesday, April 1, 2009 4:37 PM Edit
    • Marked as answer by DavidJennawayMVP, Moderator Friday, May 29, 2009 12:19 PM
    Wednesday, April 1, 2009 4:33 PM
  • I had this happen to me.  I didn't even have the custom activity in any of my workflows.

    It seemed to me that because I registered the activity within a group name that was previously unknown to the CRM ystem, the page that loads the read/write view of workflows was coughing up its attempt to render the activity in the dropdown list (this is semi-informed speculation, and I'd be happy to be corrected).

    Anyway, in my case, I don't think unregistering or re-registering anything helped at all, but restarting both the async service and IIS worked.

    HTH,
    Stuart
    Wednesday, April 1, 2009 10:36 PM