Skip to content

Commit

Permalink
Merge pull request #157 from SalesforceLabs/feature/155-block-status-…
Browse files Browse the repository at this point in the history
…flow

Feature/155 block status flow
  • Loading branch information
GeekStewie authored Mar 11, 2024
2 parents a94a584 + 88c4f57 commit a025685
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,9 @@
<valueListItems>
<value>NAME</value>
</valueListItems>
<valueListItems>
<value>Condition_Type__c</value>
</valueListItems>
<valueListItems>
<value>Condition_Description__c</value>
</valueListItems>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<description>Does the Collection Filter have any values</description>
<name>Filtered_Record_Count</name>
<label>Filtered Record Count</label>
<locationX>754</locationX>
<locationY>674</locationY>
<locationX>468</locationX>
<locationY>566</locationY>
<assignmentItems>
<assignToReference>allocationCount</assignToReference>
<operator>AssignCount</operator>
Expand All @@ -21,8 +21,8 @@
<assignments>
<name>Get_Selected_Choice</name>
<label>Get Selected Choice</label>
<locationX>754</locationX>
<locationY>1814</locationY>
<locationX>886</locationX>
<locationY>1730</locationY>
<assignmentItems>
<assignToReference>SelectedChoice</assignToReference>
<operator>Assign</operator>
Expand Down Expand Up @@ -94,35 +94,35 @@
<name>Filter_for_Allocated_Records</name>
<elementSubtype>FilterCollectionProcessor</elementSubtype>
<label>Filter for Allocated Records</label>
<locationX>754</locationX>
<locationY>566</locationY>
<assignNextValueToReference>currentItem_Filter_for_Allocated_Records_0</assignNextValueToReference>
<locationX>468</locationX>
<locationY>458</locationY>
<assignNextValueToReference>currentItem_Filter_for_Allocated_Records</assignNextValueToReference>
<collectionProcessorType>FilterCollectionProcessor</collectionProcessorType>
<collectionReference>AllRecords</collectionReference>
<conditionLogic>(1 AND 2) OR (3 AND 4)</conditionLogic>
<conditions>
<leftValueReference>currentItem_Filter_for_Allocated_Records_0.Unit_Status__c</leftValueReference>
<leftValueReference>currentItem_Filter_for_Allocated_Records.Unit_Status__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>Allocated</stringValue>
</rightValue>
</conditions>
<conditions>
<leftValueReference>currentItem_Filter_for_Allocated_Records_0.Location_Capacity__c</leftValueReference>
<leftValueReference>currentItem_Filter_for_Allocated_Records.Location_Capacity__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>Single Animal</stringValue>
</rightValue>
</conditions>
<conditions>
<leftValueReference>currentItem_Filter_for_Allocated_Records_0.Location_Capacity__c</leftValueReference>
<leftValueReference>currentItem_Filter_for_Allocated_Records.Location_Capacity__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>Multiple Animals</stringValue>
</rightValue>
</conditions>
<conditions>
<leftValueReference>currentItem_Filter_for_Allocated_Records_0.Allocation__c</leftValueReference>
<leftValueReference>currentItem_Filter_for_Allocated_Records.Allocation__c</leftValueReference>
<operator>GreaterThan</operator>
<rightValue>
<numberValue>0.0</numberValue>
Expand All @@ -135,10 +135,10 @@
<decisions>
<name>Does_Block_Have_Allocated_Units</name>
<label>Does Block Have Allocated Units</label>
<locationX>754</locationX>
<locationY>782</locationY>
<locationX>468</locationX>
<locationY>674</locationY>
<defaultConnector>
<targetReference>Loop_Through_Units</targetReference>
<targetReference>What_is_the_new_Status</targetReference>
</defaultConnector>
<defaultConnectorLabel>No</defaultConnectorLabel>
<rules>
Expand All @@ -160,8 +160,8 @@
<decisions>
<name>What_is_the_new_Status</name>
<label>What is the new Status?</label>
<locationX>754</locationX>
<locationY>458</locationY>
<locationX>886</locationX>
<locationY>782</locationY>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>Status_Available</name>
Expand Down Expand Up @@ -189,7 +189,7 @@
</rightValue>
</conditions>
<connector>
<targetReference>Filter_for_Allocated_Records</targetReference>
<targetReference>Loop_Through_Units</targetReference>
</connector>
<label>Unavailable</label>
</rules>
Expand Down Expand Up @@ -235,11 +235,11 @@
<recordLookups>
<name>Get_All_Units</name>
<label>Get All Units</label>
<locationX>754</locationX>
<locationX>468</locationX>
<locationY>350</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>What_is_the_new_Status</targetReference>
<targetReference>Filter_for_Allocated_Records</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
Expand Down Expand Up @@ -267,8 +267,8 @@
<recordUpdates>
<name>Update_Block_Status</name>
<label>Update Block Status</label>
<locationX>754</locationX>
<locationY>1922</locationY>
<locationX>886</locationX>
<locationY>1838</locationY>
<connector>
<targetReference>Completed</targetReference>
</connector>
Expand All @@ -295,11 +295,15 @@
<recordUpdates>
<name>Update_Unit_Status_to_Available</name>
<label>Update Unit Status to Available</label>
<locationX>50</locationX>
<locationY>566</locationY>
<locationX>314</locationX>
<locationY>890</locationY>
<connector>
<targetReference>Get_Selected_Choice</targetReference>
</connector>
<faultConnector>
<isGoTo>true</isGoTo>
<targetReference>Error_Screen</targetReference>
</faultConnector>
<filterLogic>and</filterLogic>
<filters>
<field>Parent_Block__c</field>
Expand Down Expand Up @@ -339,8 +343,8 @@
<screens>
<name>Completed</name>
<label>Completed</label>
<locationX>754</locationX>
<locationY>2030</locationY>
<locationX>886</locationX>
<locationY>1946</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
Expand All @@ -362,7 +366,7 @@
<allowPause>false</allowPause>
<fields>
<name>Error_Screen_Text</name>
<fieldText>&lt;p&gt;&lt;strong&gt;&lt;em&gt;OOPS!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;There has been an error when the flow attempted to update the status for this block.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Try and click the Previous button below to go back and try again. If the problem persists, send a note of the fault message below to your Salesforce administrator or Salesforce Support.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Fault Message:&lt;/p&gt;&lt;p&gt;{!$Flow.FaultMessage}&lt;/p&gt;</fieldText>
<fieldText>&lt;p&gt;There has been an error in the flow when it attempting to update records.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Click the Previous button below to go back and try again. If the problem persists, contact your &lt;span style=&quot;background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);&quot;&gt;Salesforce administrator with &lt;/span&gt;the fault message below.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Fault Message:&lt;/p&gt;&lt;p&gt;{!$Flow.FaultMessage}&lt;/p&gt;</fieldText>
<fieldType>DisplayText</fieldType>
</fields>
<showFooter>true</showFooter>
Expand All @@ -371,8 +375,8 @@
<screens>
<name>Has_Allocated_Units</name>
<label>Has Allocated Units</label>
<locationX>578</locationX>
<locationY>890</locationY>
<locationX>50</locationX>
<locationY>782</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
Expand All @@ -387,7 +391,7 @@
<screens>
<name>Start_Screen</name>
<label>Start Screen</label>
<locationX>754</locationX>
<locationX>468</locationX>
<locationY>134</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
Expand All @@ -410,22 +414,27 @@
<inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
<isRequired>false</isRequired>
</fields>
<fields>
<name>Start_Screen_Text_Note</name>
<fieldText>&lt;p&gt;&lt;strong style=&quot;font-size: 10px;&quot;&gt;NOTE:&lt;/strong&gt;&lt;span style=&quot;font-size: 10px;&quot;&gt; Units will be set as Allocated, and the Block will be set as Unavailable&lt;/span&gt;&lt;/p&gt;</fieldText>
<fieldType>DisplayText</fieldType>
</fields>
<helpText>&lt;p&gt;This wizard allows you to update the status for all units within a single block at the same time. &lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;For example if the block needs to be closed for maintenance, you can use this to update the whole block to unavailable.&lt;/p&gt;</helpText>
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<start>
<locationX>628</locationX>
<locationX>342</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Start_Screen</targetReference>
</connector>
</start>
<status>Active</status>
<status>Draft</status>
<subflows>
<name>Get_Unit_RecordType_Id</name>
<label>Get Unit RecordType Id</label>
<locationX>754</locationX>
<locationX>468</locationX>
<locationY>242</locationY>
<connector>
<targetReference>Get_All_Units</targetReference>
Expand Down Expand Up @@ -462,7 +471,7 @@
<objectType>Locations__c</objectType>
</variables>
<variables>
<name>currentItem_Filter_for_Allocated_Records_0</name>
<name>currentItem_Filter_for_Allocated_Records</name>
<dataType>SObject</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
Expand All @@ -477,14 +486,6 @@
<isOutput>false</isOutput>
<objectType>Locations__c</objectType>
</variables>
<variables>
<name>noOfMultiAnimalUnits</name>
<dataType>Number</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<scale>0</scale>
</variables>
<variables>
<name>recordId</name>
<dataType>SObject</dataType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@
<editHeading>true</editHeading>
<label>Information</label>
<layoutColumns>
<layoutItems>
<behavior>Readonly</behavior>
<field>Name</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Condition_Description__c</field>
<field>Short_Description__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Start_Date__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>End_Date_Time__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Animal__c</field>
Expand All @@ -33,23 +25,31 @@
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Short_Description__c</field>
<field>Condition_Description__c</field>
</layoutItems>
</layoutColumns>
<layoutColumns>
<layoutItems>
<behavior>Edit</behavior>
<field>OwnerId</field>
<field>Condition_Type__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>End_Date_Time__c</field>
</layoutItems>
</layoutColumns>
<style>TwoColumnsTopToBottom</style>
</layoutSections>
<layoutSections>
<customLabel>false</customLabel>
<detailHeading>false</detailHeading>
<detailHeading>true</detailHeading>
<editHeading>true</editHeading>
<label>System Information</label>
<layoutColumns>
<layoutItems>
<behavior>Readonly</behavior>
<field>Name</field>
</layoutItems>
<layoutItems>
<behavior>Readonly</behavior>
<field>CreatedById</field>
Expand All @@ -60,6 +60,10 @@
<behavior>Readonly</behavior>
<field>LastModifiedById</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>OwnerId</field>
</layoutItems>
</layoutColumns>
<style>TwoColumnsTopToBottom</style>
</layoutSections>
Expand Down Expand Up @@ -90,6 +94,11 @@
<actionType>StandardButton</actionType>
<sortOrder>2</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>Clone</actionName>
<actionType>StandardButton</actionType>
<sortOrder>3</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>ChangeOwnerOne</actionName>
<actionType>StandardButton</actionType>
Expand All @@ -98,37 +107,32 @@
<platformActionListItems>
<actionName>NewEvent</actionName>
<actionType>QuickAction</actionType>
<sortOrder>7</sortOrder>
<sortOrder>5</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>NewTask</actionName>
<actionType>QuickAction</actionType>
<sortOrder>8</sortOrder>
<sortOrder>6</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>SendEmail</actionName>
<actionType>QuickAction</actionType>
<sortOrder>9</sortOrder>
<sortOrder>7</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>LogACall</actionName>
<actionType>QuickAction</actionType>
<sortOrder>10</sortOrder>
<sortOrder>8</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>NewCase</actionName>
<actionType>QuickAction</actionType>
<sortOrder>11</sortOrder>
<sortOrder>9</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>PrintableView</actionName>
<actionType>StandardButton</actionType>
<sortOrder>14</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>Clone</actionName>
<actionType>StandardButton</actionType>
<sortOrder>3</sortOrder>
<sortOrder>10</sortOrder>
</platformActionListItems>
</platformActionList>
<relatedLists>
Expand Down Expand Up @@ -179,7 +183,7 @@
<showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
<showSubmitAndAttachButton>false</showSubmitAndAttachButton>
<summaryLayout>
<masterLabel>00h3z00000rt3Pm</masterLabel>
<masterLabel>00h8K000002S435</masterLabel>
<sizeX>4</sizeX>
<sizeY>0</sizeY>
<summaryLayoutStyle>Default</summaryLayoutStyle>
Expand Down
Loading

0 comments on commit a025685

Please sign in to comment.