Skip to main content

Notifications

Announcements

No record found.

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

  • Bilal Islam Profile Picture
    Bilal Islam 80 on at
    RE: Work Order System Status sets "Closed-Canceled" throws Error "Workflow must be Published"

    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

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Work Order System Status sets "Closed-Canceled" throws Error "Workflow must be Published"

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans