web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Work Order System Status sets "Closed-Canceled" throws Error "Workflow must be Published"

(0) ShareShare
ReportReport
Posted on by 80

when user set Work Orde system status field to "Closed-Canceled", then system throws exception

 2185.tempsnip.png

In log file

Exception Message: Workflow must be in Published state.

ErrorCode: -2147220891
HexErrorCode: 0x80040265

ErrorDetails:
ApiExceptionSourceKey: Plugin/Microsoft.Crm.ObjectModel.WorkflowService
ApiStepKey: 46f6cf4c-14ae-4f1e-98a1-eae99a37e95c
ApiDepthKey: 2
ApiActivityIdKey: 3984c89d-b4d0-4f9c-b314-d1a86345cb15
ApiPluginSolutionNameKey: System
ApiStepSolutionNameKey: System
ApiExceptionCategory: ClientError
ApiExceptionMesageName: ExecuteUnpublishedWorkflow
ApiExceptionHttpStatusCode: 400
OperationStatus: 0
SubErrorCode: -2146233088

TraceText:
[Microsoft.Dynamics.FieldService: Microsoft.Dynamics.FieldService.FieldServicePlugin]
[81819e14-09c5-48d4-bf9d-f1147df5f501: Field Service: Update (post-operation) for msdyn_workorder]


[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
[46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]

Activity Id: cae17c64-36ac-4ddc-b880-623bf5000c95

Any one have idea how to fix that issue?

Many Thanks

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi Bilal,

    The immediate thought was to check all the workflow associated to work order and see if they all are published.

    You can Go Settings > Process

    pastedimage1602122347746v1.png 

    pastedimage1602122357639v2.png

    Make sure status is active.

    pastedimage1602122370790v3.png

    Then I'd suggest Deactivating and then Reactivating the workflow and see if the issue still occurs.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Bilal Islam Profile Picture
    80 on at

    Thank you Leah Ju,

    it was because of one workflow triggers as child flow in another custom action

    and this custom action triggers in Plugin on System Status field change.

    it was issue reason.

    When I reactivated it, it works.

    Again Thank you Leah Ju

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
11manish Profile Picture

11manish 35

#1
Jimmy Passeti Profile Picture

Jimmy Passeti 35 Most Valuable Professional

#3
ManoVerse Profile Picture

ManoVerse 32 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans