Hi Team,
Im trying to create a Bookable Resource Bookings record and while saving im getting "Workflow must be in Published state." Please help on this
Please find the log details below:
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: 4fb26904-b73f-4596-9859-9e971f87241d
ApiPluginSolutionNameKey: System
ApiStepSolutionNameKey: System
ApiExceptionCategory: ClientError
ApiExceptionMesageName: ExecuteUnpublishedWorkflow
ApiExceptionHttpStatusCode: 400
OperationStatus: 0
SubErrorCode: -2146233088
TraceText:
[Microsoft.Dynamics.FieldService: Microsoft.Dynamics.FieldService.FieldServicePlugin]
[2ca77cea-2599-4669-9990-7ecb34754a3b: Field Service: Create (post-operation) for bookableresourcebooking]
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 20
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: Parent PluginContext Start
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 30
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: PluginContext End
FpsPlugin: Parent PluginContext End
FpsPlugin: PluginContext End
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: InitializePlugin: local
FpsPlugin: ConfigurePluginFlagsSupportInternal()
FpsPlugin: CreateEntityOperation(bookableresourcebooking)
FpsPlugin: Operation type: BookableResourceBookingOperation
FpsPlugin: operation.Initialize()
FpsPlugin: operation.Execute()
FpsPlugin: PluginStage: 20 MessageName: Create
FpsPlugin: Before calling message handler
FpsPlugin: Before
FpsPlugin: BeforeCreate
FpsPlugin: BeforeCreateOrUpdate
FpsPlugin: BookingSetupMetadata: Cache miss for 5 BookingSetupMetadataDB records
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving soft
FpsPlugin: PipelineLocal.Value: Retrieving hard
FpsPlugin: Settings: Retrieving local
FpsPlugin: Settings: Retrieving hard
FpsPlugin: CrmMetadataCache [46611051|203]: REQUEST Timestamp: 8655183!12/11/2020 15:02:29, Metadata:
FpsPlugin: CrmMetadataCache [46611051|203]: RESPONSE Timestamp: 8655183!12/11/2020 15:02:29, Metadata:
FpsPlugin: CrmMetadataCache [46611051|203]: GET Expired: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: Settings: Retrieving local
FpsPlugin: After calling message handler
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
Entered ScheduleCommon.Plugins.PreOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
Exiting ScheduleCommon.Plugins.PreOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
Entered Microsoft.Dynamics.CoreServiceScheduling.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
PostOperationBookableResourceBookingCreate Enter
PostOperationBookableResourceBookingCreate Exit since either bookableresourcebooking is null or the IDs dont match.
Exiting Microsoft.Dynamics.CoreServiceScheduling.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 40
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: Parent PluginContext Start
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 30
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: PluginContext End
FpsPlugin: Parent PluginContext End
FpsPlugin: PluginContext End
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: InitializePlugin: local
FpsPlugin: ConfigurePluginFlagsSupportInternal()
FpsPlugin: CreateEntityOperation(bookableresourcebooking)
FpsPlugin: Operation type: BookableResourceBookingOperation
FpsPlugin: operation.Initialize()
FpsPlugin: operation.Execute()
FpsPlugin: PluginStage: 40 MessageName: Create
FpsPlugin: Before calling message handler
FpsPlugin: After
FpsPlugin: AfterCreate
FpsPlugin: AfterCreateOrUpdate
FpsPlugin: Settings: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving soft
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PluginLocal.Create, Depth: 2
FpsPlugin: PluginLocal.Dispose, Depth: 2
FpsPlugin: PluginLocal.Create, Depth: 2
FpsPlugin: PluginLocal.Dispose, Depth: 2
FpsPlugin: After calling message handler
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
Entered ScheduleCommon.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
Exiting ScheduleCommon.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
[Microsoft.Dynamics.FieldService: Microsoft.Dynamics.FieldService.FieldServicePlugin]
[353aaf45-010b-43b2-beb3-9e60ef7c08f4: Field Service: Create (post-operation) for msdyn_fieldservicesystemjob]
[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
[46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]
Activity Id: 4342fd84-ccc0-4fe7-b1c3-2758bff0c34a