diff --git a/force-app/main/default/flexipages/Animal_Record_Page.flexipage-meta.xml b/force-app/main/default/flexipages/Animal_Record_Page.flexipage-meta.xml index 7b735e28..1ef4215f 100644 --- a/force-app/main/default/flexipages/Animal_Record_Page.flexipage-meta.xml +++ b/force-app/main/default/flexipages/Animal_Record_Page.flexipage-meta.xml @@ -77,6 +77,9 @@ animalshelters__Animal__c.Multi_Animal_Clone + + animalshelters__Animal__c.New_Human_Relationship + Global.NewEvent @@ -2188,13 +2191,92 @@ actionNames - MassChangeOwner + New + + + + + adminFilters + + + RECORDTYPE|EQUALS|["Animal_Relationship"] + + + Active__c|EQUALS|true + + + + + maxRecordsToDisplay + 10 + + + parentFieldApiName + Animal__c.Id + + + relatedListApiName + Animal_Relationships__r + + + relatedListDisplayType + ADVGRID + + + relatedListFieldAliases + + + Related_Animal_Name__c + + + Relationship_Types__c + + NAME + + + + + relatedListLabel + Active Animal Relationships + + + showActionBar + true + + + sortFieldAlias + Status__c + + + sortFieldOrder + Ascending + + lst:dynamicRelatedList + lst_dynamicRelatedList9 + + + + + + actionNames + New + + adminFilters + + + RECORDTYPE|EQUALS|["Human_Relationship"] + + + Active__c|EQUALS|true + + + maxRecordsToDisplay 10 @@ -2214,23 +2296,100 @@ relatedListFieldAliases + + Name__c + + + Relationship_Types__c + + + Start_Date__c + NAME + + + + relatedListLabel + Active Animal/Contact Relationships + + + showActionBar + true + + + sortFieldAlias + __DEFAULT__ + + + sortFieldOrder + Default + + lst:dynamicRelatedList + lst_dynamicRelatedList11 + + + + + + actionNames + - Related_Animal__c + New + + + + adminFilters + - Related_Animal_Name__c + Active__c|EQUALS|false + + + + + maxRecordsToDisplay + 10 + + + parentFieldApiName + Animal__c.Id + + + relatedListApiName + Animal_Relationships__r + + + relatedListDisplayType + ADVGRID + + + relatedListFieldAliases + + + Animal_Name__c - Status__c + Name__c + + + Relationship_Types__c + + + Start_Date__c + + + End_Date__c + + + NAME relatedListLabel - Animal Relationships + Archived Relationships showActionBar @@ -2238,14 +2397,14 @@ sortFieldAlias - Status__c + __DEFAULT__ sortFieldOrder - Ascending + Default lst:dynamicRelatedList - lst_dynamicRelatedList9 + lst_dynamicRelatedList12 Facet-d29ddff1-4c2b-41b7-8464-4022c20ebe8b diff --git a/force-app/main/default/flexipages/Animal_Relationship_Record_Page.flexipage-meta.xml b/force-app/main/default/flexipages/Animal_Relationship_Record_Page.flexipage-meta.xml index 0528963c..4f072bf6 100644 --- a/force-app/main/default/flexipages/Animal_Relationship_Record_Page.flexipage-meta.xml +++ b/force-app/main/default/flexipages/Animal_Relationship_Record_Page.flexipage-meta.xml @@ -75,8 +75,12 @@ - Record.Animal_Name__c - RecordAnimal_Name__cField + + uiBehavior + none + + Record.Relationship_Types__c + Recordanimalshelters__Relationship_Types__cField @@ -85,27 +89,59 @@ uiBehavior none - Record.Animal__c - RecordAnimal__cField + Record.Start_Date__c + Recordanimalshelters__Start_Date__cField + Facet-68662187-8f71-47f2-86b5-7b3da55118e2 + Facet + + uiBehavior none - Record.Status__c - RecordStatus__cField + Record.Active__c + Recordanimalshelters__Active__cField - Record.External_Id__c - Recordanimalshelters__External_Id__cField + + uiBehavior + none + + Record.End_Date__c + Recordanimalshelters__End_Date__cField - Facet-e0a8926f-51de-44d3-b00c-5e840edb0236 + Facet-29733fd2-1330-4d06-9dac-b2a3c3c27138 + Facet + + + + + + body + Facet-68662187-8f71-47f2-86b5-7b3da55118e2 + + flexipage:column + flexipage_column7 + + + + + + body + Facet-29733fd2-1330-4d06-9dac-b2a3c3c27138 + + flexipage:column + flexipage_column8 + + + Facet-bad8d788-413a-4d12-a395-cc0a5643dd47 Facet @@ -113,12 +149,26 @@ uiBehavior - readonly + none - Record.Related_Animal_Name__c - RecordRelated_Animal_Name__cField + Record.Animal__c + RecordAnimal__cField + + + + uiBehavior + none + + Record.Animal_Name__c + RecordAnimal_Name__cField + + + Facet-e0a8926f-51de-44d3-b00c-5e840edb0236 + Facet + + @@ -129,6 +179,16 @@ RecordRelated_Animal__cField + + + + uiBehavior + readonly + + Record.Related_Animal_Name__c + RecordRelated_Animal_Name__cField + + Facet-bffbd6d8-1681-499f-94e2-838fb81b801d Facet @@ -157,18 +217,144 @@ Facet + + + + uiBehavior + none + + Record.Contact__c + Recordanimalshelters__Contact__cField + + + + + + uiBehavior + none + + Record.Organisation__c + Recordanimalshelters__Organisation__cField + + + Facet-15b2d7d2-7559-4c07-ac34-e029607dc150 + Facet + + + + + + uiBehavior + none + + Record.Internal_User__c + Recordanimalshelters__Internal_User__cField + + + + + + uiBehavior + none + + Record.Name__c + Recordanimalshelters__Contact_Name__cField + + + Facet-067149a4-42e4-47bc-9e74-8c0e1de9a678 + Facet + + + + + + body + Facet-15b2d7d2-7559-4c07-ac34-e029607dc150 + + flexipage:column + flexipage_column5 + + + + + + body + Facet-067149a4-42e4-47bc-9e74-8c0e1de9a678 + + flexipage:column + flexipage_column6 + + + Facet-bf2cbb94-f131-43fe-a564-cd8397bc31fb + Facet + + + + + + columns + Facet-bad8d788-413a-4d12-a395-cc0a5643dd47 + + + horizontalAlignment + false + + + label + Details + + flexipage:fieldSection + flexipage_fieldSection4 + + columns Facet-cc784015-b845-40fc-9480-dd01c309927c + + horizontalAlignment + false + label - Information + Animal Relationship flexipage:fieldSection flexipage_fieldSection + + + {!Record.RecordType.Name} + EQUAL + Animal Relationship + + + + + + + + columns + Facet-bf2cbb94-f131-43fe-a564-cd8397bc31fb + + + horizontalAlignment + false + + + label + Human Relationship + + flexipage:fieldSection + flexipage_fieldSection3 + + + {!Record.RecordType.Name} + EQUAL + Human Relationship + + Facet-e395cd63-6440-44e2-b040-771851ca1668 @@ -195,6 +381,16 @@ RecordOwnerIdField + + + + uiBehavior + none + + Record.External_Id__c + Recordanimalshelters__External_Id__cField + + Facet-aa9b5971-cc8d-49ad-b1b4-e3300b9f3712 Facet @@ -253,6 +449,10 @@ columns Facet-2b2554de-fa19-482d-9dc6-636f28525d51 + + horizontalAlignment + false + label System Information @@ -364,6 +564,10 @@ + + showLegacyActivityComposer + false + runtime_sales_activities:activityPanel runtime_sales_activities_activityPanel diff --git a/force-app/main/default/flexipages/Animal_Shelter_Contact_Record_Page.flexipage-meta.xml b/force-app/main/default/flexipages/Animal_Shelter_Contact_Record_Page.flexipage-meta.xml index 8be775d8..5ca51222 100644 --- a/force-app/main/default/flexipages/Animal_Shelter_Contact_Record_Page.flexipage-meta.xml +++ b/force-app/main/default/flexipages/Animal_Shelter_Contact_Record_Page.flexipage-meta.xml @@ -235,6 +235,11 @@ adminFilters + + + Active__c|EQUALS|true + + maxRecordsToDisplay @@ -246,7 +251,7 @@ relatedListApiName - Animals__r + Animal_Relationships__r relatedListDisplayType @@ -259,19 +264,16 @@ Animal_Name__c - TypeFromBreeds__c - - - Species__c + NAME - NAME + Relationship_Types__c relatedListLabel - Related Animals + Animal Relationships showActionBar diff --git a/force-app/main/default/flows/Animal_Adoption_Update_Automation.flow-meta.xml b/force-app/main/default/flows/Animal_Adoption_Update_Automation.flow-meta.xml index b99274a0..7da94d72 100644 --- a/force-app/main/default/flows/Animal_Adoption_Update_Automation.flow-meta.xml +++ b/force-app/main/default/flows/Animal_Adoption_Update_Automation.flow-meta.xml @@ -1,8 +1,7 @@ 60.0 - [Animal Shelter] - When Adoption Status = Adopted: Update Contact Flag, Clear - current and create new Movement record, update Animal status and details + [Animal Shelter] - When Adoption Status = Adopted: Update Contact Flag, Clear current and create new Movement record, update Animal status and details. Create Relationship record Default formulaAdoptionDate @@ -44,7 +43,7 @@ Create_New_Movement_Record 176 - 755 + 863 Close_Animal_Action_Records @@ -75,12 +74,59 @@ Movement__c true + + Create_new_Relationship_record_for_Owner + + 176 + 1295 + + Update_Adoption_Record + + + Active__c + + true + + + + Animal__c + + $Record.Animal__r.Id + + + + Contact__c + + $Record.Primary_Contact__r.Id + + + + RecordTypeId + + Get_Relationship_Record_Type_ID.returnedRecordTypeId + + + + Relationship_Types__c + + Owner + + + + Start_Date__c + + $Flow.CurrentDate + + + Animal_Relationship__c + true + Get the Current Movement Record for the Animal Get_Current_Movement_Record 176 - 431 + 539 false Clean_Up_Location_Record @@ -109,7 +155,7 @@ Clean_Up_Location_Record 176 - 539 + 647 Close_Current_Movement_Record @@ -140,7 +186,7 @@ Close_Animal_Action_Records 176 - 863 + 971 Update_Animal_Record @@ -197,7 +243,7 @@ Close_Current_Movement_Record 176 - 647 + 755 Create_New_Movement_Record @@ -224,12 +270,11 @@ Movement__c - Sets the "Is An Adopter" Flag on the associated Contact to indicate - they are an Adopter + Sets the "Is An Adopter" Flag on the associated Contact to indicate they are an Adopter Set_Adopter_Flag_on_Contact_to_True 176 - 323 + 431 Get_Current_Movement_Record @@ -254,7 +299,7 @@ Update_Adoption_Record 176 - 1079 + 1403 Date_Collected__c @@ -274,9 +319,9 @@ Update_Animal_Record 176 - 971 + 1079 - Update_Adoption_Record + Update_any_Existing_Owner_Relationship_Record and @@ -298,19 +343,57 @@ Adopted - See Adoption Record + Animal__c + + + Update_any_Existing_Owner_Relationship_Record + + 176 + 1187 + + Create_new_Relationship_record_for_Owner + + and + + Animal__c + EqualTo + + $Record.Animal__r.Id + + + + Active__c + EqualTo + + true + + + + Relationship_Types__c + EqualTo + + Owner + + - Previous_Current_Owner__c + Active__c - $Record.Primary_Contact__r.Id + false - Animal__c + + End_Date__c + + $Flow.CurrentDate + + + Animal_Relationship__c 50 0 - Set_Adopter_Flag_on_Contact_to_True + Get_Relationship_Record_Type_ID true and @@ -326,4 +409,27 @@ RecordAfterSave Active + + Get_Relationship_Record_Type_ID + + 176 + 323 + + Set_Adopter_Flag_on_Contact_to_True + + Animal_RecordType_Subflow + + developerName + + Human_Relationship + + + + sObjectName + + animalshelters__Animal_Relationship__c + + + true + diff --git a/force-app/main/default/flows/Animal_Animal_Entry_Flow.flow-meta.xml b/force-app/main/default/flows/Animal_Animal_Entry_Flow.flow-meta.xml index 1a1087aa..d7bc3bb0 100644 --- a/force-app/main/default/flows/Animal_Animal_Entry_Flow.flow-meta.xml +++ b/force-app/main/default/flows/Animal_Animal_Entry_Flow.flow-meta.xml @@ -1,11 +1,59 @@ 62.0 + + Add_Contact_Finder_Relationship_to_Collection + + 490 + 1214 + + newRelationships + Add + + newRelationship + + + + Get_Default_Shelter + + + + Add_Contact_Relationship_to_Collection + + 138 + 1214 + + newRelationships + Add + + newRelationship + + + + Create_Relationship_records + + + + Add_Default_Shelter_Relationship_to_Collection + + 578 + 1646 + + newRelationships + Add + + newRelationship + + + + Create_Relationship_records + + Additional_Assignment_Data - 534 - 2138 + 50 + 2846 newAlert.Animal__c Assign @@ -28,8 +76,8 @@ Assigns additional and mandatory animal details Assign_Additional_Animal_Details - 798 - 242 + 1040 + 350 newAnimal.Date_of_Arrival__c Assign @@ -58,8 +106,8 @@ Clear_Animal_Collection - 666 - 2702 + 182 + 3410 newAnimal Assign @@ -72,6 +120,169 @@ start_Screen + + Create a new Relationship record and set the created contact as the Finder + Create_Relationship_for_Contact_as_Finder + + 490 + 1106 + + newRelationship.Animal__c + Assign + + newAnimal.Id + + + + newRelationship.Contact__c + Assign + + newContact.Id + + + + newRelationship.Active__c + Assign + + true + + + + newRelationship.Start_Date__c + Assign + + $Flow.CurrentDate + + + + newRelationship.Relationship_Types__c + Assign + + Finder + + + + newRelationship.RecordTypeId + Assign + + Get_Human_Relationship_RecordType_Id.returnedRecordTypeId + + + + Add_Contact_Finder_Relationship_to_Collection + + + + Create a new Relationship record with Contact as Owner + Create_Relationship_for_Contact_as_Owner + + 138 + 1106 + + newRelationship.Animal__c + Assign + + newAnimal.Id + + + + newRelationship.Contact__c + Assign + + newContact.Id + + + + newRelationship.Active__c + Assign + + true + + + + newRelationship.Start_Date__c + Assign + + $Flow.CurrentDate + + + + newRelationship.Relationship_Types__c + Assign + + Owner + + + + newRelationship.RecordTypeId + Assign + + Get_Human_Relationship_RecordType_Id.returnedRecordTypeId + + + + Add_Contact_Relationship_to_Collection + + + + Create a relationship record and sets the Default Organisation as the Owner + Create_Relationship_for_Default_Shelter_as_Owner + + 578 + 1538 + + newRelationship.Animal__c + Assign + + newAnimal.Id + + + + newRelationship.Active__c + Assign + + true + + + + newRelationship.Start_Date__c + Assign + + $Flow.CurrentDate + + + + newRelationship.Relationship_Types__c + Assign + + Owner + + + + newRelationship.Organisation__c + Assign + + Get_Default_Shelter.accountID + + + + newRelationship.RecordTypeId + Assign + + Get_Human_Relationship_RecordType_Id.returnedRecordTypeId + + + + newRelationship.Contact__c + Assign + + + + + + Add_Default_Shelter_Relationship_to_Collection + + DifferentAnimalType Yes - Different characteristics @@ -99,8 +310,8 @@ Assign_Location - 798 - 1322 + 314 + 2030 Create_Assessment_Record @@ -124,8 +335,8 @@ Create_Alert_Record - 798 - 1922 + 314 + 2630 Create_Additional_Animal_Screen @@ -150,8 +361,8 @@ Does the User want to create another Animal entry Create_another_Animal_entry_record - 798 - 2594 + 314 + 3302 Default Yes_Duplicate @@ -200,8 +411,8 @@ Create_Assessment_Record - 798 - 1622 + 314 + 2330 Create_Alert_Record @@ -225,10 +436,11 @@ Create_Contact - 798 - 458 + 1040 + 566 - Assign_Location + true + Get_Default_Shelter Default Outcome @@ -252,9 +464,9 @@ Is_Contact_Owner 314 - 890 + 998 - Assign_Location + Create_Relationship_for_Contact_as_Finder Default Outcome @@ -268,11 +480,37 @@ - Update_Animal_Record_with_Contact + Create_Relationship_for_Contact_as_Owner + + If the Default Shelter Name is null then do not set + Is_Default_Shelter_Null + + 490 + 1430 + + Create_Relationship_for_Default_Shelter_as_Owner + + Is Set + + Yes_is_Null + and + + Get_Default_Shelter.accountID + IsNull + + true + + + + Create_Relationship_records + + + + [Animal Shelters] - Screen flow providing an Animal Entry wizard. Allows creation of Animal, Location assignment, Assessment, Contact and Alerts. Default @@ -309,8 +547,8 @@ Create_Alert - 534 - 2246 + 50 + 2954 Create_Additional_Animal_Screen @@ -324,8 +562,8 @@ Create the new Animal Record Create_New_Animal_Record - 798 - 350 + 1040 + 458 Create_Contact @@ -339,7 +577,7 @@ Create_New_Contact 314 - 782 + 890 Is_Contact_Owner @@ -349,11 +587,25 @@ newContact + + Create_Relationship_records + + 314 + 1922 + + Assign_Location + + + true + Error_Screen + + newRelationships + Is_Person_Accounts_enabled 314 - 566 + 674 false Contact_Details_Screen @@ -381,40 +633,11 @@ FieldDefinition true - - Update animal record with the Contact just created - Update_Animal_Record_with_Contact - - 50 - 998 - - Assign_Location - - - true - Error_Screen - - and - - Id - EqualTo - - newAnimal.Id - - - - Previous_Current_Owner__c - - newContact.Id - - - Animal__c - Animal_Create_Alert - 534 - 2030 + 50 + 2738 false true false @@ -487,7 +710,7 @@ Contact_Details_Screen 314 - 674 + 782 false true false @@ -626,8 +849,8 @@ Create_Additional_Animal_Screen - 798 - 2486 + 314 + 3194 false true false @@ -651,8 +874,8 @@ Error_Screen - 1458 - 458 + 2030 + 566 false true false @@ -667,8 +890,8 @@ start_Screen - 798 - 134 + 1040 + 242 false true false @@ -879,10 +1102,10 @@ true - 672 + 914 0 - start_Screen + Get_Human_Relationship_RecordType_Id Active @@ -890,8 +1113,8 @@ Call Create new Assessment Screen Flow and pass Record Id of new Animal Create_New_Assessment - 666 - 1730 + 182 + 2438 Create_Alert_Record @@ -903,12 +1126,46 @@ + + Get_Default_Shelter + + 490 + 1322 + + Is_Default_Shelter_Null + + Animal_Default_Shelter_Name_Subflow + true + + + Get_Human_Relationship_RecordType_Id + + 1040 + 134 + + start_Screen + + Animal_RecordType_Subflow + + developerName + + Human_Relationship + + + + sObjectName + + animalshelters__Animal_Relationship__c + + + true + Call Movement Process Screen Flow and pass Record Id of new Animal Movement_Process_Screen_Flow - 666 - 1430 + 182 + 2138 Create_Assessment_Record @@ -952,4 +1209,20 @@ false Contact + + newRelationship + SObject + false + false + false + Animal_Relationship__c + + + newRelationships + SObject + true + false + false + Animal_Relationship__c + diff --git a/force-app/main/default/flows/Animal_Create_Reciprocal_Animal_Relationship.flow-meta.xml b/force-app/main/default/flows/Animal_Create_Reciprocal_Animal_Relationship.flow-meta.xml index d80e6f2b..8e5931ee 100644 --- a/force-app/main/default/flows/Animal_Create_Reciprocal_Animal_Relationship.flow-meta.xml +++ b/force-app/main/default/flows/Animal_Create_Reciprocal_Animal_Relationship.flow-meta.xml @@ -30,13 +30,25 @@ Create_Reciprocal_Relationship 176 - 431 + 539 + + Active__c + + true + + Animal__c $Record.Related_Animal__r.Id + + RecordTypeId + + Get_Animal_Relationship_Record_Type_ID.returnedRecordTypeId + + Record_Created__c @@ -50,9 +62,15 @@ - Status__c + Relationship_Types__c + + $Record.Relationship_Types__c + + + + Start_Date__c - Current + $Record.Start_Date__c Animal_Relationship__c @@ -62,7 +80,7 @@ Update_Origin 176 - 323 + 431 Create_Reciprocal_Relationship @@ -86,7 +104,7 @@ 50 0 - Update_Origin + Get_Animal_Relationship_Record_Type_ID and @@ -96,9 +114,39 @@ false + + Record_Type_Name__c + EqualTo + + Animal Relationship + + Animal_Relationship__c Create RecordAfterSave Active + + Get_Animal_Relationship_Record_Type_ID + + 176 + 323 + + Update_Origin + + Animal_RecordType_Subflow + + developerName + + Animal_Relationship + + + + sObjectName + + animalshelters__Animal_Relationship__c + + + true + diff --git a/force-app/main/default/flows/Animal_Default_Shelter_Name_Subflow.flow-meta.xml b/force-app/main/default/flows/Animal_Default_Shelter_Name_Subflow.flow-meta.xml new file mode 100644 index 00000000..7e87b008 --- /dev/null +++ b/force-app/main/default/flows/Animal_Default_Shelter_Name_Subflow.flow-meta.xml @@ -0,0 +1,100 @@ + + + 62.0 + + Assign_Account_ID_to_Output_Variable + + 50 + 350 + + accountID + Assign + + Get_Account_Based_on_Account_Name.Id + + + + + Check Custom Setting to see if Default Shelter Name is Set + Is_Default_Shelter_Name_Set + + 182 + 134 + No Name Set + + Yes_Name_Set + and + + $Setup.animalshelters__Animal_Shelter_Settings__c.animalshelters__Default_Shelter_Name__c + IsNull + + false + + + + Get_Account_Based_on_Account_Name + + + + + [Animal Shelter] - Subflow to check and get the Account based on the Default Shelter Name setting. Returns Account Id + Default + Animal - Default Shelter Name - Subflow {!$Flow.CurrentDateTime} + true + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + AutoLaunchedFlow + + Get_Account_Based_on_Account_Name + + 50 + 242 + false + + Assign_Account_ID_to_Output_Variable + + and + + Name + EqualTo + + $Setup.animalshelters__Animal_Shelter_Settings__c.animalshelters__Default_Shelter_Name__c + + + true + Account + true + + + 56 + 0 + + Is_Default_Shelter_Name_Set + + + Active + + accountID + String + false + false + true + + diff --git a/force-app/main/default/flows/Animal_Foster_Relationship_SubFlow.flow-meta.xml b/force-app/main/default/flows/Animal_Foster_Relationship_SubFlow.flow-meta.xml new file mode 100644 index 00000000..c8fca8e7 --- /dev/null +++ b/force-app/main/default/flows/Animal_Foster_Relationship_SubFlow.flow-meta.xml @@ -0,0 +1,222 @@ + + + 62.0 + + Existing_Foster_Relationship + + 182 + 458 + + Create_New_Foster_Relationship + + None Existing + + Yes_Existing + and + + Get_Existing_Foster_Relationship_records + IsNull + + false + + + + Updated_Existing_Foster_Relationship + + + + + + Is_Movement_Type_Fostered + + 336 + 242 + No + + Yes + and + + movementRecord.Type__c + EqualTo + + Fostered + + + + Get_Existing_Foster_Relationship_records + + + + + [Animal Shelter] - Subflow - Creates a new Foster Relationship record, and updates existing + Default + Animal - Foster Relationship SubFlow {!$Flow.CurrentDateTime} + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + AutoLaunchedFlow + + Create_New_Foster_Relationship + + 182 + 758 + + Active__c + + true + + + + Animal__c + + movementRecord.Animal__r.Id + + + + Contact__c + + movementRecord.Location__r.Foster_Contact__r.Id + + + + RecordTypeId + + Get_Relationship_RecordType.returnedRecordTypeId + + + + Relationship_Types__c + + Foster + + + + Start_Date__c + + $Flow.CurrentDate + + + Animal_Relationship__c + true + + + Get_Existing_Foster_Relationship_records + + 182 + 350 + false + + Existing_Foster_Relationship + + and + + Animal__c + EqualTo + + movementRecord.Animal__r.Id + + + + Relationship_Types__c + EqualTo + + Foster + + + + Active__c + EqualTo + + true + + + true + Animal_Relationship__c + true + + + Updated_Existing_Foster_Relationship + + 50 + 566 + + Create_New_Foster_Relationship + + and + + Id + EqualTo + + Get_Existing_Foster_Relationship_records.Id + + + + Active__c + + false + + + + End_Date__c + + $Flow.CurrentDate + + + Animal_Relationship__c + + + 210 + 0 + + Get_Relationship_RecordType + + + Active + + Get_Relationship_RecordType + + 336 + 134 + + Is_Movement_Type_Fostered + + Animal_RecordType_Subflow + + developerName + + Human_Relationship + + + + sObjectName + + animalshelters__Animal_Relationship__c + + + true + + + movementRecord + SObject + false + true + false + Movement__c + + diff --git a/force-app/main/default/flows/Animal_Human_Relationship_Management.flow-meta.xml b/force-app/main/default/flows/Animal_Human_Relationship_Management.flow-meta.xml new file mode 100644 index 00000000..5627a496 --- /dev/null +++ b/force-app/main/default/flows/Animal_Human_Relationship_Management.flow-meta.xml @@ -0,0 +1,463 @@ + + + 62.0 + + Assign additional values for New Relationship record + Assign_additional_values + + 314 + 458 + + newRelationship.Active__c + Assign + + true + + + + newRelationship.Animal__c + Assign + + recordId.Id + + + + newRelationship.RecordTypeId + Assign + + Get_Record_Type_for_Animal_Relationship.returnedRecordTypeId + + + + newRelationship.Start_Date__c + Assign + + $Flow.CurrentDate + + + + Has_a_row_been_selected + + + + Copy_Selected_Row_Record + + 50 + 674 + + selectedRow + Assign + + AnimalRelationshipsDatatable.firstSelectedRow + + + + Sets_current_relationship_status_to_archived + + + + Sets_current_relationship_status_to_archived + + 50 + 782 + + selectedRow.Active__c + Assign + + false + + + + selectedRow.End_Date__c + Assign + + $Flow.CurrentDate + + + + Update_Current_Relationship + + + + Contact + Contact + String + + Contact + + + + InternalUser + Internal User + String + + Internal User + + + + Organisation + Organisation + String + + Organisation + + + + Decides whether a Row has been selected for Update + Has_a_row_been_selected + + 314 + 566 + + Create_New_Relationship + + No Row Selected + + Row_Selected + and + + AnimalRelationshipsDatatable.firstSelectedRow + IsNull + + false + + + + Copy_Selected_Row_Record + + + + + [Animal Shelter] - Screen flow to manage the relationships between Contacts/Organisations (Accounts)/Internal Users and Animals + Default + Animal - Human Relationship Management {!$Flow.CurrentDateTime} + true + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + Flow + + Create_New_Relationship + + 314 + 1130 + + true + Flow_Error_Screen + + newRelationship + + + Get all current relationships with Contacts for the Animal + Get_Current_Relationships_for_Animal + + 314 + 242 + false + + Animal_Relationships_Screen + + + Flow_Error_Screen + + and + + Animal__c + EqualTo + + recordId.Id + + + + RecordTypeId + EqualTo + + Get_Record_Type_for_Animal_Relationship.returnedRecordTypeId + + + + Active__c + EqualTo + + true + + + false + Animal_Relationship__c + true + + + Update_Current_Relationship + + 50 + 890 + + Create_New_Relationship + + + true + Flow_Error_Screen + + selectedRow + + + Animal_Relationships_Screen + + 314 + 350 + false + true + true + + Assign_additional_values + + + Animal_Relationships_Screen_Section1 + RegionContainer + + Animal_Relationships_Screen_Section1_Column1 + Region + + Animal_Relationships_Screen_Text + <p>Select a existing relationship to update, and choose the Contact, Organisation or Internal User and relationship.</p><p>Or create a new relationship</p> + DisplayText + + + width + + 12 + + + false + + false + SectionWithoutHeader + + + Animal_Relationships_Screen_Section2 + RegionContainer + + Animal_Relationships_Screen_Section2_Column1 + Region + + AnimalRelationshipsDatatable + + T + Animal_Relationship__c + + flowruntime:datatable + ComponentInstance + + selectionMode + + SINGLE_SELECT + + + + minRowSelection + + 0.0 + + + + tableData + + Get_Current_Relationships_for_Animal + + + + shouldDisplayLabel + + true + + + + maxRowSelection + + 1.0 + + + + columns + + [{"apiName":"animalshelters__Name__c","guid":"column-23e3","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":0,"label":"Name","type":"customRichText"},{"apiName":"animalshelters__Relationship_Types__c","guid":"column-6c43","editable":false,"hasCustomHeaderLabel":false,"customHeaderLabel":"","wrapText":true,"order":1,"label":"Relationship Types","type":"text"}] + + + + label + + Animal Relationships + + + UseStoredValues + true + true + + + width + + 12 + + + false + + false + SectionWithoutHeader + + + Connected_Human_Organisation + Contact + Organisation + InternalUser + String + Connected Human/Organisation + RadioButtons + UseStoredValues + true + + + ObjectProvided + UseStoredValues + false + newRelationship.Contact__c + + and + + Connected_Human_Organisation + EqualTo + + Contact + + + + + + ObjectProvided + UseStoredValues + false + newRelationship.Organisation__c + + and + + Connected_Human_Organisation + EqualTo + + Organisation + + + + + + ObjectProvided + UseStoredValues + false + newRelationship.Internal_User__c + + and + + Connected_Human_Organisation + EqualTo + + InternalUser + + + + + + ObjectProvided + UseStoredValues + false + newRelationship.Relationship_Types__c + + true + true + + + Flow_Error_Screen + + 1018 + 350 + true + true + true + + Flow_Error_Screen_Text + <p>There has been a problem with the Flow. Please contact your administrator with the following information:</p><p><br></p><p>{!$Flow.CurrentDateTime}</p><p>{!$Flow.FaultMessage}</p><p>{!$User.Username}</p> + DisplayText + + true + true + + + 188 + 0 + + Get_Record_Type_for_Animal_Relationship + + + Active + + Gets the RecordType ID for the Animal_Relationship RecordType on the Relationships object + Get_Record_Type_for_Animal_Relationship + + 314 + 134 + + Get_Current_Relationships_for_Animal + + Animal_RecordType_Subflow + + developerName + + Human_Relationship + + + + sObjectName + + animalshelters__Animal_Relationship__c + + + true + + + newRelationship + SObject + false + false + false + Animal_Relationship__c + + + recordId + SObject + false + true + false + Animal__c + + + selectedRow + SObject + false + false + false + Animal_Relationship__c + + diff --git a/force-app/main/default/flows/Animal_Movement_Process.flow-meta.xml b/force-app/main/default/flows/Animal_Movement_Process.flow-meta.xml index b6620a69..53efc36f 100755 --- a/force-app/main/default/flows/Animal_Movement_Process.flow-meta.xml +++ b/force-app/main/default/flows/Animal_Movement_Process.flow-meta.xml @@ -594,7 +594,7 @@ 490 1730 - Reset_Location_Status + Clear_Foster_Relationship true @@ -626,7 +626,7 @@ Reset_Location_Status 490 - 1838 + 1946 CreateMovementRecord @@ -880,7 +880,7 @@ Movement_Complete 1502 - 2438 + 2546 false true false @@ -956,11 +956,27 @@ Active + + Clear_Foster_Relationship + + 490 + 1838 + + Reset_Location_Status + + Animal_Subflow_Clear_Foster_Relationship + + movementRecord + + Get_Current_Movement_Record + + + CreateMovementRecord 1502 - 2330 + 2438 Movement_Complete diff --git a/force-app/main/default/flows/Animal_Movement_SubFlow.flow-meta.xml b/force-app/main/default/flows/Animal_Movement_SubFlow.flow-meta.xml index 4c353c3b..30ce5a7d 100755 --- a/force-app/main/default/flows/Animal_Movement_SubFlow.flow-meta.xml +++ b/force-app/main/default/flows/Animal_Movement_SubFlow.flow-meta.xml @@ -4,7 +4,7 @@ Error_Email 578 - 758 + 866 emailSimple emailSimple CurrentTransaction @@ -101,7 +101,7 @@ Set_Output_Variable 182 - 1058 + 1166 newMovementRecordId Assign @@ -147,13 +147,13 @@ Generate_Movement_Task 182 - 1166 + 1274 No Yes and - $Setup.Animal_Shelter_Settings__c.Enable_Movement_Tasks__c + $Setup.animalshelters__Animal_Shelter_Settings__c.animalshelters__Enable_Movement_Tasks__c EqualTo true @@ -194,7 +194,7 @@ Update_Animal_Location_Fields 182 - 758 + 866 Set_Output_Variable @@ -254,7 +254,7 @@ 182 542 - Get_Newly_Created_Movement_Record + Create_Foster_Relationship_if_required true @@ -266,7 +266,7 @@ Get_Newly_Created_Movement_Record 182 - 650 + 758 false Update_Animal_Location_Fields @@ -290,7 +290,7 @@ Update_Animal_Location_Status 50 - 866 + 974 Set_Output_Variable @@ -324,11 +324,27 @@ Active + + Create_Foster_Relationship_if_required + + 182 + 650 + + Get_Newly_Created_Movement_Record + + Animal_Foster_Relationship_SubFlow + + movementRecord + + varNewMovementRecord + + + Create_Movement_Task 50 - 1274 + 1382 Animal_Generate_Tasks_Subflow animalRecordId diff --git a/force-app/main/default/flows/Animal_Subflow_Clear_Foster_Relationship.flow-meta.xml b/force-app/main/default/flows/Animal_Subflow_Clear_Foster_Relationship.flow-meta.xml new file mode 100644 index 00000000..d5285398 --- /dev/null +++ b/force-app/main/default/flows/Animal_Subflow_Clear_Foster_Relationship.flow-meta.xml @@ -0,0 +1,106 @@ + + + 62.0 + + Was_Movement_a_Foster_Type + + 182 + 134 + No + + Yes + and + + movementRecord.Type__c + EqualTo + + Fostered + + + + Update_Related_Relationship_record + + + + + [Animal Shelter] Subflow - Clears the Foster Relationship when Animal moves from a Foster + Default + Animal - Subflow - Clear Foster Relationship {!$Flow.CurrentDateTime} + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + AutoLaunchedFlow + + Update_Related_Relationship_record + + 50 + 242 + and + + Animal__c + EqualTo + + movementRecord.Animal__r.Id + + + + Active__c + EqualTo + + true + + + + Relationship_Types__c + EqualTo + + Foster + + + + Active__c + + false + + + + End_Date__c + + $Flow.CurrentDate + + + Animal_Relationship__c + + + 56 + 0 + + Was_Movement_a_Foster_Type + + + Active + + movementRecord + SObject + false + true + false + Movement__c + + diff --git a/force-app/main/default/globalValueSets/Animal_Relationships.globalValueSet-meta.xml b/force-app/main/default/globalValueSets/Animal_Relationships.globalValueSet-meta.xml new file mode 100644 index 00000000..d4b67f4d --- /dev/null +++ b/force-app/main/default/globalValueSets/Animal_Relationships.globalValueSet-meta.xml @@ -0,0 +1,46 @@ + + + + Owner + false + + + + Trainer + false + + + + Foster + false + + + + Carer + false + + + + Parent/Child + false + + + + Sibling + false + + + + Breeder + false + + + + Finder + false + + + [Animal Shelter] List of Relationships between Animal-to-Animal and Contact-to-Animal + Animal Relationships + false + diff --git a/force-app/main/default/layouts/Animal_Relationship__c-Animal Relationship Layout.layout-meta.xml b/force-app/main/default/layouts/Animal_Relationship__c-Animal Relationship Layout.layout-meta.xml index 3d9c30c5..6896aa67 100644 --- a/force-app/main/default/layouts/Animal_Relationship__c-Animal Relationship Layout.layout-meta.xml +++ b/force-app/main/default/layouts/Animal_Relationship__c-Animal Relationship Layout.layout-meta.xml @@ -1,6 +1,5 @@ - OpenSlackRecordChannel false false @@ -8,29 +7,52 @@ - Readonly - Animal_Name__c + Edit + Relationship_Types__c Edit - Animal__c + Start_Date__c + + + + + Edit + Active__c Edit - Status__c + End_Date__c + + + + true + true + true + + + Edit + Animal__c + Readonly - Related_Animal_Name__c + Animal_Name__c + + Edit Related_Animal__c + + Readonly + Related_Animal_Name__c + - + false @@ -98,7 +120,7 @@ false false - 00h8F000006l3LB + 00hKU000000kgYs 4 0 Default diff --git a/force-app/main/default/layouts/Animal_Relationship__c-Human Relationship Layout.layout-meta.xml b/force-app/main/default/layouts/Animal_Relationship__c-Human Relationship Layout.layout-meta.xml new file mode 100644 index 00000000..75cbca12 --- /dev/null +++ b/force-app/main/default/layouts/Animal_Relationship__c-Human Relationship Layout.layout-meta.xml @@ -0,0 +1,147 @@ + + + + false + false + true + + + + Edit + Relationship_Types__c + + + Edit + Start_Date__c + + + + + Edit + Active__c + + + Edit + End_Date__c + + + + + + true + true + true + + + + Edit + Animal__c + + + + + Readonly + Animal_Name__c + + + + + + true + true + true + + + + Edit + Contact__c + + + Readonly + Name__c + + + + + Edit + Organisation__c + + + Edit + Internal_User__c + + + + + + false + false + true + + + + Readonly + CreatedById + + + Readonly + Name + + + Edit + External_Id__c + + + + + Readonly + LastModifiedById + + + Edit + OwnerId + + + + + + true + false + true + + + + + + + + TASK.SUBJECT + TASK.WHO_NAME + ACTIVITY.TASK + TASK.DUE_DATE + TASK.STATUS + TASK.PRIORITY + CORE.USERS.FULL_NAME + RelatedActivityList + + + TASK.SUBJECT + TASK.WHO_NAME + ACTIVITY.TASK + TASK.DUE_DATE + CORE.USERS.FULL_NAME + TASK.LAST_UPDATE + RelatedHistoryList + + false + false + false + false + false + + 00hKU000000mjYI + 4 + 0 + Default + + diff --git a/force-app/main/default/layouts/Contact-Animal Shelter Contact Page Layout.layout-meta.xml b/force-app/main/default/layouts/Contact-Animal Shelter Contact Page Layout.layout-meta.xml index bb31dc53..e3e3e7ae 100644 --- a/force-app/main/default/layouts/Contact-Animal Shelter Contact Page Layout.layout-meta.xml +++ b/force-app/main/default/layouts/Contact-Animal Shelter Contact Page Layout.layout-meta.xml @@ -2,7 +2,8 @@ CreateCallList CreateSurveyInvitation - RequestUseSfdc + DataDotComClean + OpenSlackRecordChannel Submit XClean @@ -171,6 +172,21 @@ Record + + Contact.New_Adopter_Profile + QuickAction + 0 + + + NewTask + QuickAction + 1 + + + LogACall + QuickAction + 2 + NewCase QuickAction @@ -206,6 +222,11 @@ StandardButton 9 + + SendSurveyInvitation + StandardButton + 10 + Clone StandardButton @@ -261,26 +282,6 @@ ProductivityAction 21 - - SendSurveyInvitation - StandardButton - 10 - - - Contact.New_Adopter_Profile - QuickAction - 0 - - - NewTask - QuickAction - 1 - - - LogACall - QuickAction - 2 - @@ -324,11 +325,7 @@ NAME - Animal_Name__c - Type__c - Breed__c - Animal_Status__c - Animal__c.Previous_Current_Owner__c + Animal_Relationship__c.Contact__c OPPORTUNITY.NAME @@ -392,7 +389,7 @@ false false - 00h7d0000011vwc + 00hKU000000kgZ5 4 0 Default diff --git a/force-app/main/default/lwc/animalShelterSettingsEditor/animalShelterSettingsEditor.html b/force-app/main/default/lwc/animalShelterSettingsEditor/animalShelterSettingsEditor.html index 947127ae..4358dc30 100644 --- a/force-app/main/default/lwc/animalShelterSettingsEditor/animalShelterSettingsEditor.html +++ b/force-app/main/default/lwc/animalShelterSettingsEditor/animalShelterSettingsEditor.html @@ -15,6 +15,32 @@ + +
+ + +

Animal Shelter Starter - Setup Checklist

+

If this is the first time you have used the Animal Shelter Starter Pack, + follow this checklist to confirm correct configuration.

+

+
    +
  1. Enable Path
  2. +
  3. Update Page Layout assignments on the Animal Action Object
  4. +
  5. Update Page Layout assignments on the Location Object
  6. +
  7. Update Page Layout assignments on the Contact Object (optional)
  8. +
  9. Update Page Layout assignments on the Account Object (optional)
  10. +
  11. Load Breeds Data
  12. +
  13. Setup your Locations
  14. +
  15. Review and check Flows
  16. +
  17. Create a Account record for your Shelter which will be used as the default Animal Owner for animals coming into + the shelter
  18. +
  19. Review and check Custom Settings
  20. +
+
+
+
+
+
@@ -163,6 +189,21 @@ + + + +

Default Shelter Name

+

Create an Account for your Shelter and enter the Account Name here. + By default incoming Animals will be given a Owner relationship with this Account.

+
+ + + +
+
diff --git a/force-app/main/default/objects/Animal_Relationship__c/Animal_Relationship__c.object-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/Animal_Relationship__c.object-meta.xml index 1d7cc417..c9a5bc54 100644 --- a/force-app/main/default/objects/Animal_Relationship__c/Animal_Relationship__c.object-meta.xml +++ b/force-app/main/default/objects/Animal_Relationship__c/Animal_Relationship__c.object-meta.xml @@ -168,6 +168,7 @@ AutoNumber Animal Relationships + false ReadWrite Vowel diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Active__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Active__c.field-meta.xml new file mode 100644 index 00000000..dbfe36e5 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Active__c.field-meta.xml @@ -0,0 +1,11 @@ + + + Active__c + false + [Animal Shelter] Indicates whether this relationship is active + false + + false + false + Checkbox + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Contact__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Contact__c.field-meta.xml new file mode 100644 index 00000000..28ad17e7 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Contact__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Contact__c + SetNull + false + + Contact + Animal Relationships + Animal_Relationships + false + false + false + Lookup + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/End_Date__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/End_Date__c.field-meta.xml new file mode 100644 index 00000000..4dc2b447 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/End_Date__c.field-meta.xml @@ -0,0 +1,11 @@ + + + End_Date__c + [Animal Shelter] The end date of the relationship + false + + false + false + false + Date + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Internal_User__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Internal_User__c.field-meta.xml new file mode 100644 index 00000000..5651b1ff --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Internal_User__c.field-meta.xml @@ -0,0 +1,13 @@ + + + Internal_User__c + SetNull + false + + User + Animal_Relationships + false + false + false + Lookup + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Name__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Name__c.field-meta.xml new file mode 100644 index 00000000..16e6bd7a --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Name__c.field-meta.xml @@ -0,0 +1,25 @@ + + + Name__c + false + IF( + NOT(ISBLANK(Contact__c)), + Contact__r.FirstName & " " & Contact__r.LastName, + IF( + NOT(ISBLANK(Organisation__c)), + Organisation__r.Name, + IF( + NOT(ISBLANK( Internal_User__c )), + Internal_User__r.FirstName & " " & Internal_User__r.LastName , + "" + ) + ) +) + BlankAsZero + + false + false + false + Text + false + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Organisation__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Organisation__c.field-meta.xml new file mode 100644 index 00000000..b79c9588 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Organisation__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Organisation__c + SetNull + false + + Account + Animal Relationships + Animal_Relationships + false + false + false + Lookup + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Record_Type_Name__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Record_Type_Name__c.field-meta.xml new file mode 100644 index 00000000..de961bf2 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Record_Type_Name__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Record_Type_Name__c + INTERNAL Use Only + false + RecordType.Name + BlankAsZero + + false + false + false + Text + false + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Relationship_Types__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Relationship_Types__c.field-meta.xml new file mode 100644 index 00000000..8969fc01 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Relationship_Types__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Relationship_Types__c + false + + false + false + false + Picklist + + true + Animal_Relationships + + diff --git a/force-app/main/default/objects/Animal_Relationship__c/fields/Start_Date__c.field-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/fields/Start_Date__c.field-meta.xml new file mode 100644 index 00000000..71f0169b --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/fields/Start_Date__c.field-meta.xml @@ -0,0 +1,11 @@ + + + Start_Date__c + [Animal Shelter] The start date of the relationship + false + + false + false + false + Date + diff --git a/force-app/main/default/objects/Animal_Relationship__c/listViews/Active_Animal_Relationships.listView-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/listViews/Active_Animal_Relationships.listView-meta.xml new file mode 100644 index 00000000..34a020b9 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/listViews/Active_Animal_Relationships.listView-meta.xml @@ -0,0 +1,24 @@ + + + Active_Animal_Relationships + NAME + Animal__c + Animal_Name__c + Related_Animal__c + Related_Animal_Name__c + Relationship_Types__c + Active__c + Start_Date__c + Everything + + Active__c + equals + 1 + + + RECORDTYPE + equals + Animal_Relationship__c.Animal_Relationship + + + diff --git a/force-app/main/default/objects/Animal_Relationship__c/listViews/Active_Human_Relationships.listView-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/listViews/Active_Human_Relationships.listView-meta.xml new file mode 100644 index 00000000..7871aa4c --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/listViews/Active_Human_Relationships.listView-meta.xml @@ -0,0 +1,26 @@ + + + Active_Human_Relationships + NAME + Animal__c + Animal_Name__c + Contact__c + Internal_User__c + Name__c + Organisation__c + Relationship_Types__c + Active__c + Start_Date__c + Everything + + Active__c + equals + 1 + + + RECORDTYPE + equals + Animal_Relationship__c.Human_Relationship + + + diff --git a/force-app/main/default/objects/Animal_Relationship__c/listViews/All.listView-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/listViews/All.listView-meta.xml index d5058512..90e3fe07 100644 --- a/force-app/main/default/objects/Animal_Relationship__c/listViews/All.listView-meta.xml +++ b/force-app/main/default/objects/Animal_Relationship__c/listViews/All.listView-meta.xml @@ -1,6 +1,17 @@ All + NAME + Active__c + Animal__c + Animal_Name__c + Record_Created__c + RECORDTYPE + Related_Animal__c + Related_Animal_Name__c + Relationship_Types__c + Start_Date__c + Record_Type_Name__c Everything diff --git a/force-app/main/default/objects/Animal_Relationship__c/recordTypes/Animal_Relationship.recordType-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/recordTypes/Animal_Relationship.recordType-meta.xml new file mode 100644 index 00000000..42d0514a --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/recordTypes/Animal_Relationship.recordType-meta.xml @@ -0,0 +1,29 @@ + + + Animal_Relationship + true + Relationships between Animals + + + Relationship_Types__c + + Parent%2FChild + true + + + Sibling + false + + + + Status__c + + Archived + false + + + Current + true + + + diff --git a/force-app/main/default/objects/Animal_Relationship__c/recordTypes/Human_Relationship.recordType-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/recordTypes/Human_Relationship.recordType-meta.xml new file mode 100644 index 00000000..67295e8d --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/recordTypes/Human_Relationship.recordType-meta.xml @@ -0,0 +1,45 @@ + + + Human_Relationship + true + Relationships between Contacts/Accounts and Animals + + + Relationship_Types__c + + Breeder + false + + + Carer + false + + + Finder + false + + + Foster + false + + + Owner + false + + + Trainer + false + + + + Status__c + + Archived + false + + + Current + true + + + diff --git a/force-app/main/default/objects/Animal_Relationship__c/validationRules/Check_that_only_one_lookup_is_populated.validationRule-meta.xml b/force-app/main/default/objects/Animal_Relationship__c/validationRules/Check_that_only_one_lookup_is_populated.validationRule-meta.xml new file mode 100644 index 00000000..6dc6aba2 --- /dev/null +++ b/force-app/main/default/objects/Animal_Relationship__c/validationRules/Check_that_only_one_lookup_is_populated.validationRule-meta.xml @@ -0,0 +1,15 @@ + + + Check_that_only_one_lookup_is_populated + true + Checks that the user has only selected either an Account (Organisation), a Contact or User lookup + NOT( + OR( + ISBLANK(Organisation__c) && ISBLANK(Contact__c) && ISBLANK(Internal_User__c), /* All fields are blank */ + AND(ISBLANK(Contact__c), ISBLANK(Internal_User__c), NOT(ISBLANK(Organisation__c))), /* Only Account is populated */ + AND(ISBLANK(Organisation__c), ISBLANK(Internal_User__c), NOT(ISBLANK(Contact__c))), /* Only Contact is populated */ + AND(ISBLANK(Organisation__c), ISBLANK(Contact__c), NOT(ISBLANK(Internal_User__c))) /* Only User is populated */ + ) +) + You must populate only one of the following lookup fields: Organisation, Contact, or Internal User." + diff --git a/force-app/main/default/objects/Animal_Shelter_Settings__c/fields/Default_Shelter_Name__c.field-meta.xml b/force-app/main/default/objects/Animal_Shelter_Settings__c/fields/Default_Shelter_Name__c.field-meta.xml new file mode 100644 index 00000000..9fc0e506 --- /dev/null +++ b/force-app/main/default/objects/Animal_Shelter_Settings__c/fields/Default_Shelter_Name__c.field-meta.xml @@ -0,0 +1,12 @@ + + + Default_Shelter_Name__c + The default shelter name that is associated with an Account record + false + + 255 + false + false + Text + false + diff --git a/force-app/main/default/permissionsets/Animal_Shelter_Starter.permissionset-meta.xml b/force-app/main/default/permissionsets/Animal_Shelter_Starter.permissionset-meta.xml index 7a659ca7..9437d777 100644 --- a/force-app/main/default/permissionsets/Animal_Shelter_Starter.permissionset-meta.xml +++ b/force-app/main/default/permissionsets/Animal_Shelter_Starter.permissionset-meta.xml @@ -533,6 +533,11 @@ Animal_Alert__c.Start_Date_Time__c true + + true + Animal_Relationship__c.Active__c + true + false Animal_Relationship__c.Animal_Name__c @@ -543,16 +548,46 @@ Animal_Relationship__c.Animal__c true + + true + Animal_Relationship__c.Contact__c + true + + + true + Animal_Relationship__c.End_Date__c + true + true Animal_Relationship__c.External_Id__c true + + true + Animal_Relationship__c.Internal_User__c + true + + + false + Animal_Relationship__c.Name__c + true + + + true + Animal_Relationship__c.Organisation__c + true + true Animal_Relationship__c.Record_Created__c true + + false + Animal_Relationship__c.Record_Type_Name__c + true + false Animal_Relationship__c.Related_Animal_Name__c @@ -563,6 +598,16 @@ Animal_Relationship__c.Related_Animal__c true + + true + Animal_Relationship__c.Relationship_Types__c + true + + + true + Animal_Relationship__c.Start_Date__c + true + true Animal_Relationship__c.Status__c @@ -1707,6 +1752,14 @@ Animal_Action__c.Treatment true + + Animal_Relationship__c.Animal_Relationship + true + + + Animal_Relationship__c.Human_Relationship + true + Locations__c.Block true diff --git a/force-app/main/default/quickActions/Animal__c.New_Human_Relationship.quickAction-meta.xml b/force-app/main/default/quickActions/Animal__c.New_Human_Relationship.quickAction-meta.xml new file mode 100644 index 00000000..e99874e6 --- /dev/null +++ b/force-app/main/default/quickActions/Animal__c.New_Human_Relationship.quickAction-meta.xml @@ -0,0 +1,7 @@ + + + Animal_Human_Relationship_Management + + false + Flow +