Sample for Candidate Presentation: Difference between revisions

WIP: Created final section
(WIP: Flows)
(WIP: Created final section)
Line 35: Line 35:


=== Dynamic URL Parameters and Filtering Using Flows ===
=== Dynamic URL Parameters and Filtering Using Flows ===
Screen flows can be used to automate the URL parameter process. The SOQL queries used previously will still need to be added to the repeatable sections.
Screen flows can be used to automate the adding of URL parameter. The SOQL queries used previously will still need to be added to the repeatable sections.
 




Line 45: Line 46:




Add a screen element which will be used to display all the records related to the object that will be filtered.
Add a screen element which will be used to display all of the records related to the object that will be filtered.
 
Within the screen, ddd a section component and place a data table within it (This will be used during the flow to select the records that will be filtered):
 


Within the screen, add a section component and place a data table within it (This will be used during the flow to select the records that will be filtered):
[[File:Screenshot 2023-12-06 at 13.33.18.png|none|thumb|558x558px|Data table within screen]]




Configure the data source of the data table to come from the previously added get records element 'Education Histories':
Configure the data source of the data table to come from the previously added get records element 'Education Histories':
[[File:Screenshot 2023-12-06 at 13.33.40.png|none|thumb|372x372px|Data Source ]]
[[File:Screenshot 2023-12-06 at 13.34.46.png|none|thumb|368x368px|Data Source]]




Next, create a 'For Each' element within the flow. This will be used to combine the selected records from the previous screen.
Next, create a 'For Each' element within the flow. This will be used to combine the selected records from the previous screen.
[[File:Screenshot 2023-12-06 at 13.48.07.png|none|thumb|489x489px|For Each Element]]
[[File:Screenshot 2023-12-06 at 13.48.39.png|none|thumb|493x493px|For Each Selection]]


A formula will need to be created that formats the record Id so it can be added to a URL:
[[File:Screenshot 2023-12-06 at 14.33.55.png|none|thumb|501x501px|Creating Formula]]
Full formula:<syntaxhighlight>
"'" & {!Selected_Education_Histories.Id} & "',"
</syntaxhighlight>Use this formula in the final part of the for each element:
[[File:Screenshot 2023-12-06 at 14.11.37.png|none|thumb|497x497px|Formatting Collected Records Ids]]




Create a final screen which will be used to display the document link containing the document URL with the custom filter parameter.


Create a final screen which will be used to display the document link containing the document URL with the custom filter parameter
First an additional formula will need to be used to remove the trailing comma in the filter. This can then be added to the base URL:
[[File:Screenshot 2023-12-06 at 14.37.32.png|none|thumb|505x505px|Remove Comma Formula]]
<syntaxhighlight>
LEFT({!educationHistoryFilter}, LEN({!educationHistoryFilter}) - 1)
</syntaxhighlight>
The generated url should look similar to this:<syntaxhighlight>
.../onboarding/apex/b3d__Document?templateId=exampleTemplateId&recordId={!Contact.Id}&education-filter={!educationHistoryFilterURL}
</syntaxhighlight>
47

edits