Skip to main content

#Multiday0 utenti parlano di questo argomento

Hi All -

 

We have scenario where -our business team is looking to clone Service Appointment and assign to the same resource of original appointment. Expected to action on dispatch console,

- We have created custom action and from backend we are handling clone and resource assignment.

- This use case is working as expected for non-Multiday appointment (Is Multiday checkbox is unchecked)

- We are getting following error if we try to schedule/assign resource with same action.

 

1st Issue:

=============

caused by: FSL.Exceptions.GeneralException: Service Appointment 08p010000003I37AAE status is included in pinned statuses, therefore it could not be auto scheduled. Class.FSL.SAWrapperGetSlots.checkIfServiceValid: line 64, column 1 Class.FSL.SAWrapperGetSlots.<init>: line 13, column 1 Class.FSL.MdtSchedulingUtils.getUpdatedMdtServiceLength: line 322, column 1 Class.FSL.MdtSchedulingUtils.getUpdatedMdtServiceLength: line 101, column 1 Class.FSL.MdtSchedulingUtils.updateMdtServiceLength: line 47, column 1 Class.FSL.LogicUtils.updateMdtFinishDate: line 1100, column 1 Class.FSL.TR021_AssignedResourceUtils: line 2500, column 1 Trigger.FSL.TR021_AssignedResource_AfterInsert: line 28, column 1: [] 14:49:19.304 (2304731511)|USER_DEBUG|[56]|DEBUG|Service Appointment Clone exception >> System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, FSL.TR021_AssignedResource_AfterInsert: execution of AfterInsert

 

for this error- I referred FSL trigger doc- https://developer.salesforce.com/docs/atlas.en-us.field_service_dev.meta/field_service_dev/fsl_dev_custom_triggers.htm

It has 1 point related to the multiday -(If the created resources’ service is a multi-day service appointment, this trigger checks if it’s necessary to recalculate the service duration. If so, the trigger recalculates the length.) - but did not found anything related to this error/ reason behind this failure

=====================

however Current status(Status name = Initial, Status Category- None)(before Scheduling) in not marked as pinned under Field Service Setting->Scheduling->General Logic ->Select which statuses are considered as pinned, or unmovable, for scheduling.

 

Also -

2nd issue:

 

- We are unable to Edit/update these Service appointments if Status is checked/listed/marked under Field Service Setting->Scheduling->General Logic ->Select which statuses are considered as pinned, or unmovable, for scheduling. (This also happening for multiday appointments)

 

However - based on my understanding allowing Edit/update SA is depending upon FSL__Pinned__c SA field .

 

and above mentioned configuration says-  Pinned statuses are pinned from the perspective of automated scheduling, not manual Scheduling or manual update.

 

need help to resolve above details - so that we could unblock our work progress.

 

@Steve Hupp @Leigh-Anne Nugent @Dustin Breese 

 

#Multi-day #Multiday #Service Appointments 

7 commenti
  1. 30 nov 2020, 19:19
    Hey @Satish Nikam

    so basically you are creating 'cloned' appointments in overlap of the original appointments scheduled to a resource? That would definitely not be a best practice and could have negative implications when trying to utilize items like Optimization. I'm assuming you have considered that already and just aligning to a specific use case, but something to definitely keep in mind.

    In looking closer at the code you pasted in your original post it definitely seems like it is focused around Multi-Day Work and specifically around the overall calculation of Multi-Day Work when taking into account things like absences, breaks, etc...

    I would recommend opening a case with support so others can dig deeper into debug logs and attempt to trace the error back to a specific update or call within the Multi-Day Calculation classes that are being called.

0/9000