AdvoLogix® provides a utility apex method to generate a SharePoint® folder automatically via Salesforce® Flows.
Creating a Folder Upon Record Creation Via Flows
A background automation can be created for any object you want to generate the SharePoint® folder for. AdvoLogix® provides a Flow Template named SharePoint: Create Folder, which includes a preconfigured setup of actions needed to generate the folder.
- In Salesforce® Setup, enter Flows in the Quick Find box, and select Flows.
- Select the New Flow action button in the page header to initiate a new Salesforce® flow wizard.
- Switch to the All + Templates tab.
- Select SharePoint: Create Folder template from the list of available templates.
- Select the Next button.
You now have a custom flow that will be triggered when a record is created or edited. Your administrator can update the triggering option as well as provide a different object to trigger the process.
Understanding Create Folder Flow Template Structure
- Choose the Trigger mechanism based on whether you want your folder be generated whenever a record is created or updated. The Run Flow mechanism should remain with the default selection, as you would want to be able to initiate workspace creation after the Salesforce® record has been saved and committed to the database.
- Choose the Object you want your SharePoint® folder be generated for.
- Execute Create Folder Apex Action provided by AdvoLogix as a SharePoint® utility method. The Create Folder Apex method supports the following parameters:
- Folder Name - (Required) Provide a folder name value here. For example, it could be a field on the object or a formula variable within your flow to generate a folder name dynamically when it is executed.
- Record ID - (Required) Provide the current record's record id value here.
- Base Folder Path - Provide the relative path to the SharePoint® site where the folder will be created.
- Folder Template ID - Provide a folder template's record id value here. It will be used to generate a set of subfolders within this newly created folder in SharePoint®.
- Use Asynchronous Method - Provide a true/false value to let the service know that this process is to be executed as an asynchronous approach (default value is false).
The Create New Folder apex action can be utilized within Process Builder as well.