Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

WF - Cannot update Closed or Cancelled

(0) ShareShare
ReportReport
Posted on by 385

Hello,

I have a WF that I can not run it as a non-admin userDoes anyone have any idea from where to start looking for the solution?

Since this is a problem only affect non-administrators users, I assume this is a security roll issue.

0456.1.PNG

Sync workflow failed with error message - Unhandled Exception: Microsoft.Crm.Workflow.Services.InvalidCustomActivityExecutionException: Cannot update Closed or Cancelled Activity
at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)
, error code - -2147220

  • Brad C. Moore Profile Picture
    Brad C. Moore 10 on at
    RE: WF - Cannot update Closed or Cancelled

    have observed a strange behavior when updating the completed activity. We have written the code to update the Completed Activity in the plugin and as we always do use Admin account for our development.

    Everything was working at the time of development and Testing team complained that it was not working. https://www.hairstylenext.com

    When we have checked in detail, we found that only Admins are able to update completed activity records.

    We have changed our code to use Admin User Account for updating the Activity inside the plugin and it started working like a champ.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: WF - Cannot update Closed or Cancelled

    Hi,

    you cannot update closed or cancelled activity by default, this is standard behavior, but there is a way to override it. Referring to below article.

    community.dynamics.com/.../how-to-update-activity-entity-record-when-completed-canceled-using-crm-sdk-c

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans