diff --git a/force-app/main/default/flows/Defer_Cases.flow-meta.xml b/force-app/main/default/flows/Defer_Cases.flow-meta.xml new file mode 100644 index 000000000..a856e0721 --- /dev/null +++ b/force-app/main/default/flows/Defer_Cases.flow-meta.xml @@ -0,0 +1,763 @@ + + + 60.0 + + Add_Case_to_Related_Cases_Collection + + 958 + 674 + + RelatedCaseRecords + Add + + RelatedCase + + + + Iterate_Over_Related_CRC_Records + + + + Add_CRC_record_to_CRC_Records_to_Be_Updated + + 886 + 1946 + + CRC_Records_To_Be_Updated + Add + + CRC_Record_to_Be_Updated + + + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated + + + + Assigning_Selected_SA_In_SA_Lookup_of_CRC_Linking_Selected_Case_And_Current_SA + + 886 + 1838 + + CRC_Record_to_Be_Updated.Id + Assign + + CRC_Record_Linking_User_Selected_Case_SA.Id + + + + CRC_Record_to_Be_Updated.Service_Appointment__c + Assign + + Select_Review_Meeting.firstSelectedRow.Id + + + + Add_CRC_record_to_CRC_Records_to_Be_Updated + + + + Get_Case_Related_to_Current_CRC_Record + + 958 + 566 + + RelatedCase.Id + Assign + + RelatedCaseId + + + + RelatedCase.Type + Assign + + Case_Type_of_Current_Case + + + + RelatedCase.EDRD_RPH_Simplified_Review__c + Assign + + RPh_Simplified_Review_of_Current_Case + + + + RelatedCase.EDRD_Ref_No__c + Assign + + EDRD_Ref_of_Current_Case + + + + RelatedCase.CaseNumber + Assign + + Case_Number_of_Current_Case + + + + RelatedCase.EDRD_MOHFunding_Expiry_Date__c + Assign + + Funding_Expiry_of_Current_Case + + + + RelatedCase.Provider__c + Assign + + Provider_on_Current_Case + + + + RelatedCase.EDRD_ProviderName__c + Assign + + Iterate_Over_Related_CRC_Records.Related_Case__r.EDRD_ProviderName__c + + + + Add_Case_to_Related_Cases_Collection + + + + Get_CRC_Record_Linking_Selected_Case_And_Current_SA + + 886 + 1730 + + CRC_Record_Linking_User_Selected_Case_SA.Related_Case__c + Assign + + Iterate_Over_Selected_Cases_To_Get_CRC_With_Current_SA.Id + + + + CRC_Record_Linking_User_Selected_Case_SA.Service_Appointment__c + Assign + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated.Service_Appointment__r.Id + + + + CRC_Record_Linking_User_Selected_Case_SA.Id + Assign + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated.Id + + + + Assigning_Selected_SA_In_SA_Lookup_of_CRC_Linking_Selected_Case_And_Current_SA + + + + Check_if_CRC_Records_to_Be_Updated_Collection_Is_Not_Null + + 182 + 2306 + Is Null + + Is_Not_Null + and + + CRC_Records_To_Be_Updated + IsNull + + false + + + + Update_CRC_Records + + + + + + Check_If_Current_CRC_Is_Linking_Selected_Case_And_Current_SA + + 1106 + 1622 + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated + + Default Outcome + + CRC_links_selected_case_and_current_SA + and + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated.Related_Case__r.Id + EqualTo + + Iterate_Over_Selected_Cases_To_Get_CRC_With_Current_SA.Id + + + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated.Service_Appointment__r.Id + EqualTo + + Current_Service_Appointment_Record.Id + + + + Get_CRC_Record_Linking_Selected_Case_And_Current_SA + + + + + CRC_does_not_links_selected_case_and_current_SA + and + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated.Related_Case__r.Id + NotEqualTo + + Iterate_Over_Selected_Cases_To_Get_CRC_With_Current_SA.Id + + + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated + + + + + + Does_SA_Have_Related_Cases + + 870 + 866 + Default Outcome + + Related_Cases_Exists + and + + RelatedCaseRecords + IsNull + + false + + + + Display_Related_Cases + + + + + Related_Cases_Do_Not_Exists + and + + RelatedCaseRecords + IsNull + + true + + + + No_Related_Cases + + + + + + SA_With_Same_Committee_Exists + + 458 + 1190 + Default Outcome + + Yes + and + + Get_Planned_Service_Appointments_With_Same_Committee + IsNull + + false + + + + Display_Review_Meetings + + + + + No + and + + Get_Planned_Service_Appointments_With_Same_Committee + IsNull + + true + + + + No_Meetings_Found + + + + + Default + + Case_Number_of_Current_Case + String + {!Iterate_Over_Related_CRC_Records.Related_Case__r.CaseNumber} + + + Case_Type_of_Current_Case + String + TEXT({!Iterate_Over_Related_CRC_Records.Related_Case__r.Type}) + + + EDRD_Ref_of_Current_Case + String + {!Iterate_Over_Related_CRC_Records.Related_Case__r.EDRD_Ref_No__c} + + + Funding_Expiry_of_Current_Case + Date + {!Iterate_Over_Related_CRC_Records.Related_Case__r.EDRD_MOHFunding_Expiry_Date__c} + + + Parent_Account_Id_of_Current_Service_Appointment + String + {!Current_Service_Appointment_Record.Account.Id} + + + Parent_Account_Name + String + {!Get_Parent_Account_of_Current_Service_Appointment.Name} + + + Provider_on_Current_Case + String + {!Iterate_Over_Related_CRC_Records.Related_Case__r.Provider__c} + + + RelatedCaseId + String + {!Iterate_Over_Related_CRC_Records.Related_Case__r.Id} + + + RPh_Simplified_Review_of_Current_Case + String + TEXT({!Iterate_Over_Related_CRC_Records.Related_Case__r.EDRD_RPH_Simplified_Review__c}) + + Defer Cases {!$Flow.CurrentDateTime} + + + Iterate_Over_Related_CRC_Records + + 870 + 458 + Get_Related_Committee_Review_Case_Records + Asc + + Get_Case_Related_to_Current_CRC_Record + + + Does_SA_Have_Related_Cases + + + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated + + 798 + 1514 + Get_Related_Committee_Review_Case_Records + Asc + + Check_If_Current_CRC_Is_Linking_Selected_Case_And_Current_SA + + + Iterate_Over_Selected_Cases_To_Get_CRC_With_Current_SA + + + + Iterate_Over_Selected_Cases_To_Get_CRC_With_Current_SA + + 182 + 1406 + Select_Cases.selectedRows + Asc + + Iterate_Over_Related_CRC_to_Get_CRC_to_Be_Updated + + + Check_if_CRC_Records_to_Be_Updated_Collection_Is_Not_Null + + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + Flow + + Get_Current_Service_Appointment + + 870 + 134 + false + + Get_Parent_Account_of_Current_Service_Appointment + + and + + Id + EqualTo + + recordId + + + ServiceAppointment + Current_Service_Appointment_Record + Id + Status + AccountId + EarliestStartTime + DueDate + + + Get_Parent_Account_of_Current_Service_Appointment + + 870 + 242 + false + + Get_Related_Committee_Review_Case_Records + + and + + Id + EqualTo + + Parent_Account_Id_of_Current_Service_Appointment + + + true + Account + true + + + Get_Planned_Service_Appointments_With_Same_Committee + + 458 + 1082 + false + + SA_With_Same_Committee_Exists + + and + + AccountId + EqualTo + + Get_Parent_Account_of_Current_Service_Appointment.Id + + + + Status + NotEqualTo + + Closed + + + + Id + NotEqualTo + + Current_Service_Appointment_Record.Id + + + false + ServiceAppointment + true + + + Get_Related_Committee_Review_Case_Records + + 870 + 350 + false + + Iterate_Over_Related_CRC_Records + + and + + Service_Appointment__c + EqualTo + + recordId + + + false + Committee_Review_Case__c + true + + + Update_CRC_Records + + 50 + 2414 + + Cases_Successfully_Deferred + + CRC_Records_To_Be_Updated + + + Cases_Successfully_Deferred + + 50 + 2522 + false + true + false + + Success_Message + <p>Selected case(s) are successfully deferred to {!Select_Review_Meeting.firstSelectedRow.EDRD_Name__c}</p> + DisplayText + + true + true + + + Display_Related_Cases + + 458 + 974 + true + true + false + Cancel + + Get_Planned_Service_Appointments_With_Same_Committee + + + Select_Cases + + T + Case + + flowruntime:datatable + ComponentInstance + + label + + Select Case(s) + + + + selectionMode + + MULTI_SELECT + + + + minRowSelection + + 1.0 + + + + shouldDisplayLabel + + true + + + + tableData + + RelatedCaseRecords + + + + columns + + [{"apiName":"EDRD_Ref_No__c","guid":"column-5b7d","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":0,"label":"EDRD Ref No","type":"text"},{"apiName":"CaseNumber","guid":"column-29d5","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":1,"label":"Case Number","type":"text"},{"apiName":"Type","guid":"column-3474","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":2,"label":"Case Type","type":"text"},{"apiName":"EDRD_RPH_Simplified_Review__c","guid":"column-bb4a","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":3,"label":"RPh Simplified Review","type":"text"},{"apiName":"EDRD_MOHFunding_Expiry_Date__c","guid":"column-4d00","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":4,"label":"Funding Expiry Date","type":"date-local"},{"apiName":"EDRD_ProviderName__c","guid":"column-5662","editable":false,"hasCustomHeaderLabel":true,"customHeaderLabel":"Provider","wrapText":true,"order":5,"label":"EDRD ProviderName","type":"customRichText"}] + + + UseStoredValues + true + true + + Next + true + true + + + Display_Review_Meetings + + 182 + 1298 + true + true + false + + Iterate_Over_Selected_Cases_To_Get_CRC_With_Current_SA + + + Select_Review_Meeting + + T + ServiceAppointment + + flowruntime:datatable + ComponentInstance + + label + + Select Review Meeting + + + + selectionMode + + SINGLE_SELECT + + + + minRowSelection + + 1.0 + + + + shouldDisplayLabel + + true + + + + tableData + + Get_Planned_Service_Appointments_With_Same_Committee + + + + columns + + [{"apiName":"EDRD_Name__c","guid":"column-39e1","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":0,"label":"Name","type":"text"},{"apiName":"Status","guid":"column-f073","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":1,"label":"Status","type":"text"},{"apiName":"EarliestStartTime","guid":"column-d2e3","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":2,"label":"Earliest Start Permitted","type":"customDateTime"},{"apiName":"DueDate","guid":"column-4b10","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":3,"label":"Due Date","type":"customDateTime"},{"apiName":"No_of_Cases_to_be_Presented__c","guid":"column-5fa4","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":4,"label":"No of Cases to be Presented","type":"number"},{"apiName":"No_of_Simplified_Cases__c","guid":"column-0cdc","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":5,"label":"No of Simplified Cases","type":"number"}] + + + + maxRowSelection + + 1.0 + + + UseStoredValues + true + true + + Next + true + true + + + No_Meetings_Found + + 490 + 1298 + false + true + false + + Message + <p><span style="background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);">No planned meeting(s) found for {!Parent_Account_Name}</span></p> + DisplayText + + Cancel + true + true + + + No_Related_Cases + + 1018 + 974 + true + true + true + + No_Cases_Found_Message + <p>No cases available for deferral as no cases are added to this meeting. </p> + DisplayText + + true + true + + + 744 + 0 + + Get_Current_Service_Appointment + + + Active + + CRC_Record_Linking_User_Selected_Case_SA + SObject + false + false + false + Committee_Review_Case__c + + + CRC_Record_to_Be_Updated + SObject + false + false + false + Committee_Review_Case__c + + + CRC_Records_To_Be_Updated + SObject + true + false + false + Committee_Review_Case__c + + + Current_Service_Appointment_Record + SObject + false + false + false + ServiceAppointment + + + recordId + String + false + true + false + + + RelatedCase + SObject + false + false + false + Case + + + RelatedCaseRecords + SObject + true + false + false + Case + + diff --git a/force-app/main/default/quickActions/ServiceAppointment.Defer_Cases.quickAction-meta.xml b/force-app/main/default/quickActions/ServiceAppointment.Defer_Cases.quickAction-meta.xml new file mode 100644 index 000000000..27c7db1d9 --- /dev/null +++ b/force-app/main/default/quickActions/ServiceAppointment.Defer_Cases.quickAction-meta.xml @@ -0,0 +1,7 @@ + + + Defer_Cases + + false + Flow +