Set Up Project Setup Wizard
This page covers:
Introduction to the Project Setup Wizard
The Project Setup Wizard is a powerful tool that guides users through the process of setting up the Project record and the related records that are necessary to start using features such as indicator management, activity planning, and budgeting on the Project. It guides users to create the required records while maintaining data integrity.
Implementor Note: Please refer to the Project Setup Wizard user guide to know about the features of Project Setup Wizard in detail and how to use it.
Why Use the Project Setup Wizard?
The Project Setup Wizard has these benefits:
It provides a step-by-step experience to set up records related to the Project record;
It helps with controlling data integrity by restricting the user to create records from the catalog, providing duplicate warnings;
Implementors can create multiple versions of the Project Setup Wizard to set up different related records and conditionally display them on the Project record. This helps in guiding users to understand what records need to be set up based on the project stage/ type of Project.
Implementors can customize and expand the Project Setup Wizard to meet the client’s unique use cases, such as:
Add client-specific guidelines to the sub-flows;
Add/ edit/ remove set up of related objects as required;
Add custom sub-flows to auto-setup related records;
Add custom sub-flows to clone related records from another project;
Use Many2Many for tagging records to the project inside the Project Setup Wizard.
Implementor Note: While using the wizard with Many2Many, ensure that the lookup on the junction records is populated with the ID of the tag settings record for them to show up on the M2M component. Please refer to the Many2Many setup guide for guidelines on how to use Many2Many tagging component inside a flow. If you are creating records outside of the M2M component, you have to set up another mechanism (such as a before-save flow) to default the value
Project Setup Wizard Use Cases
Add Reporting Periods to the Project
Users can add reporting periods to the Project by specifying Start Date, End Date, and Reporting Frequency. They can optionally specify the Due Dates and whether they want to create a Baseline Reporting Period.
Tag Records from a Catalog
Users can quickly create junction records between Project and a catalog object such as Geographic Areas and Thematic Areas by specifying the catalog records for which the junction records should be created
Quickly Create Related Records
Users can quickly create related records on the Project such as Frameworks, Implementation Plans, and Budgets by specifying the values for the fields in the Project Setup Wizard.
Understanding the Project Setup Wizard Flow
Implementor Note: To know what each flow element does, you can read the description by hovering over the description icon.
Main Flow (Handler Flow)
The flow Project Setup Wizard [API Name: ampi__Project_Setup_Wizard] is the handler flow.
It calls sub-flows for each object whose records are created via the Project Setup Wizard.
Once the called sub-flow ends, the next one is called by the handler flow.
Sub-flow: Create Reporting Periods
The flow Create Reporting Periods [ampi__Create_Reporting_Periods]creates Reporting Period records based on inputs by the user.
The user can input Start Date, End Date, and Reporting Frequency. They can optionally specify the Due Dates and whether they want to create a Baseline Reporting Period.
Once the user inputs are taken, the flow assigns the user inputs to variables for creating the Reporting Period records.
In QUASAR V1.47 a new Checkbox was introduced, which when checked creates Reporting Period Hierarchies automatically. The default value of this field is FALSE.
It then checks if the user skipped creating the records
Flow ends (and goes back to the handler flow) if the user has clicked on the Skip button
Checks if all the required fields are filled
If required fields are not filled, the flow shows an error message to the user
Checks if duplicate reporting periods are already present on the Project
Warns users if duplicate records are present
Creates the Reporting Period records based on user input
Shows a success message if records are created
Shows an error message if records are not created
Implementor Note: LWC components showToastMessageForFlow, existingRecordsList, and flowNavigationFooter are used in the Schedule Reporting Periods screen flow element (refer to the screenshot above). To know their details, refer to the LWCs in the flows section.
Implementor Note: Salesforce flows prevent users from moving to other screens if the inputs are marked as required using the Require checkbox. It was interfering with the functionality of the Skip button in the flowNavigationFooter LWC component in the Schedule Reporting Periods screen flow element.
Due to that, we couldn’t use the native flow element Require checkbox to mark fields as required. As a workaround, we have added HTML tags to show a red asterisk mark to the labels of the required fields and added the LWC component showToastMessageForFlow that shows error messages to users if they click on the Next button without filling in the required fields.
The field label displayed to the user can be customized but do not remove the HTML tag to ensure that the required field displays with a red asterisk to the user. These fields are required to create a Reporting Period record and will cause errors if these inputs are not populated by the user. (Refer to image given below)
Sub-Flow: Create Project Geographic Areas
Implementor Note: The flow structure for sub-flows which enable users to tag records on Project record from a Catalog (e.g. Create Project Thematic Areas [ampi__Create_Project_Thematic_Areas])is the same as the flow structure of Create Project Geographic Areas [ampi__Create_Project_Geographic_Areas]. Please follow the same instructions to understand those flows.
The flow Create Project Geographic Areas [ampi__Create_Geographic_Areas] allows users to create the Project Geographic Area junction records by selecting the corresponding catalog Geographic Area records from the dropdown.
Once the user inputs are taken, the flow
Checks if the user skipped creating the records
Flow ends (and goes back to the handler flow) if the user has clicked on the Skip button
Checks if duplicate Project Geographic Area records are already present on the Project
Checks if the user has selected any catalog record
Shows a message that no records have been selected if no catalog records have been selected
Checks if duplicates were identified in Step 2
Warns users if duplicate records are present
Implementor Note: Duplication check is done via the flow element APEX action (Check_for_Duplicate_Project_Geographic_Areas. To know the details, refer to the Apex Actions in the flows section.
5. Creates the junction records based on user selection
a. Shows a success message to the user if records are created
b. Shows an error message to the user if records are not created
Implementor Note: Records are created via the flow element APEX action Proceed_With_PGA_Creation. To know the details, refer to the Apex Actions in the flows section.
Implementor Note: LWC components existingRecordsList, and flowNavigationFooter are used in the Select Geographic Areas screen flow element Select_Geographic_Areas. To know their details, refer to the LWCs in the flows section.
Sub-Flow: Create Frameworks
Implementor Note: The flow structure for sub-flows which enable users to quickly create related records on the Project record by providing field inputs (e.g. Create Implementation Plans [ampi__Create_Implementation_Plans]and Create Budgets [ampi__Create_Budgets])is the same as the flow structure of Create Frameworks [ampi__Create_Frameworks]. Please follow the same instructions to understand those flows.
The flow Create Frameworks [ampi__Create_Frameworks] allows users to quickly create related Framework records by providing inputs to the fields displayed on the screen.
Once inputs are taken
Implementor Note: Implementers can specify which fields will be displayed for these objects in the Project Setup Wizard. Please refer to the section Adding or removing fields from setup for the details.
2. The LWC component displayFieldsUpsertRecords on Create_Frameworks screen identifies
a. If user has clicked on Skip button
b. If user checked the Create Another Framework checkbox on the screen
c. Creates the record based on user inputs
3. The flow then checks if the user skipped creating the records
a. Flow ends (and goes back to the handler flow) if user has clicked on Skip button
4. Checks if the user wants to create additional record
a. Goes back to the Create_Frameworks screen flow element if user wants to create additional Framework record
Implementor Note: LWC components displayFieldsUpsertRecords, existingRecordsList, and flowNavigationFooter are used in the Create_Frameworks screen flow element (refer to the screenshot above). To know their details, refer to the LWCs in the flows section.
Lightning Web Components Used in the Flows
showToastMessageForFlow
Used in
Create Reporting Period
What does it do
Displays a toast error message if the user leaves required fields as blank
Design Attributes
Name | Description | Expected Values | Example |
API Name | API name of the flow element for the LWC component | Text value that can only contain underscores and alphanumeric characters. | toastMessageForReportingPeriodErrors |
Mode | Determines how persistent the toast message is. | dismissible, pester, sticky (ℹ️ | dismissible |
Show Toast? | Determines whether toast will be displayed | {!$GlobalConstant.True}/ {!$GlobalConstant.False} (ℹ️ | {!showToastMessageForErrors} (ℹ️ |
Toast Header | Controls the heading of the toast | Text string | Fill in required fields |
Toast Message | Controls the body of the toast | Text string | Please check if you have filled all the required fields |
Variant | Controls the appearance of the toast | info, success, warning, error | error |
Output Variables
Name | Description | Where is the output used? | Expected Value (Data Type and Format) |
Show Toast? | Indicates if a toast message was displayed on the Reporting Period screen by passing a TRUE/ FALSE value in {!showToastMessageForErrors} variable. | If all required fields are present, then the variable {!showToastMessageForErrors} is set to FALSE by Set_Toast_Message_Error_Flag_To_False element in the sub-flow | Boolean |
displayFieldsUpsertRecords
Used in
Create Frameworks
Create Implementation Plans
Create Budgets
What does it do
Shows fields from the specified fieldset on the object
Creates a record when user clicks on Next
Design Attributes
Name | Description | Expected Values | Example |
API Name | API name of the flow element for the LWC component | Text value that can only contain underscores and alphanumeric characters. | frameworksToBeCreated |
Input Type | The object being used in the LWC component | Object Name | Framework |
API Name of FieldSet | API Name of the fieldset that controls the fields to be displayed | Fieldset API Name | ampi__FRAMEWORK_SETUP |
API Name of Lookup to Parent | API Name of the lookup field to the parent object from which the Project Setup Wizard is fired (e.g. Project) | Field API Name | ampi__xx_Project__c |
API Name of Object | API Name of the object being set up | Object API Name | ampi__xx_Framework__c |
Create Another Record? | This is set to {!$GlobalConstant.True} if user clicks on the checkbox to create another record | {!$GlobalConstant.True}/ {!$GlobalConstant.False}
| {!$GlobalConstant.False} |
Insufficient Access Error Message | This message is displayed to users if they don’t have sufficient access to create a record for this object | Text string | This record will not be created since you don’t have access to the object. Please click on the Skip button to move to the next screen. |
Last Screen of Flow? | Set this to {!$GlobalConstant.True} if you want to set the current screen as last screen of the Project Setup Wizard flow.
If this is set to {!$GlobalConstant.True} and Create Another Record is TRUE, then the label of the Done button is updated to Next Implementor Note: Implementors will have to manually update the label of Next button to Done on last screen. Refer to this section for details. | {!$GlobalConstant.True}/ {!$GlobalConstant.False} | {!$GlobalConstant.False} |
Record ID of the Parent | Record ID of the parent record from which the Project Setup Wizard is fired (e.g. Project record) | Salesforce Record ID | {!recordId} (ℹ️ |
Record Insert Flag | This is set to {!$GlobalConstant.True} if the record is created successfully. The default value is {!$GlobalConstant.False}. | {!$GlobalConstant.True}/ {!$GlobalConstant.False} | {!$GlobalConstant.False} |
Record to be Created | This flow variable stores the Record ID of created record | Record Variable (Single) | {!frameworkToBeCreated} (ℹ️ |
Output Variables
Name | Description | Where is the output used? | Expected Value (Data Type and Format) |
Create Another Record? | Indicates if user checked the option to create another record on screen by passing a TRUE/ FALSE value in {!createMultipleRecords} variable. | The output is used by decision element Multiple_Records_To_Be_Created to check if user checked the option to create another record | Boolean |
Is Skip Button Pressed? | Indicates if the Skip button was pressed on the screen by passing a TRUE/ FALSE value in {!isSkipButtonPressed} variable. | The output is used by the decision element is_Skipped_Button_Clicked to check if the user clicked on the Skip button | Boolean |
Record Insert Flag | Indicates if the record was successfully created by passing a TRUE/ FALSE value in {!isRecordInserted} variable. | The output is used by the LWC itself to display a toast to the user confirming record creation. | Boolean |
Record to be Created | Stores the created record in {!frameworkToBeCreated} variable | This output variable is used by the LWC itself to store the record details of the most recently created variable. This is done to retain the details when the user navigates back to the screen using the Previous button. | Record Variable (Single) |
existingRecordsList
Used in
Create Reporting Periods
Create Project Geographic Areas
Create Project Thematic Areas
Create Frameworks
Create Implementation Plans
Create Budgets
What does it do
Shows existing records of the object on the parent object (from which the Project Setup Wizard is fired. e.g Project)
Design Attributes
Name | Description | Expected Values | Example |
API Name | API name of the flow element for the LWC component | Text value that can only contain underscores and alphanumeric characters. | displayExistingProjectGeographicAreas |
API Name of Object | API Name of the object whose existing records are displayed | Object API Name | ampi__Project_Geographic_Area__c |
API Name of Lookup to Parent | API Name of the lookup field to the parent object from which the Project Setup Wizard is fired (e.g. Project) | Field API Name | ampi__Project__c |
Record ID of the Parent | Record ID of the parent record from which the Project Setup Wizard is fired (e.g. Project record) | Salesforce Record ID | {!recordId} (ℹ️ |
Is Display Field on a Parent? | If {!$GlobalConstant.True}, it indicates that the display field is on a related parent object | {!$GlobalConstant.True}/ {!$GlobalConstant.False} | TRUE |
API Name of lookup to Parent for Display Field | API name of the lookup field to the parent object that has display field | Field API Name | ampi__Geographic_Area__c |
API Name of Display Field | API name of the field whose values are displayed in the existing records list | Field API Name | ampi__Name_Translated__c |
Label | This text will appear above the list of existing records as the label | Text string | This project already has the following Project Geographic Area records |
Character Limit | The max character limit of the string of records displayed. After the specified character limit, the string will display ellipses (...) | Numbers | 1000 |
flowNavigationFooter
Implementor Note: Using the native flow navigation, the LWC components can’t retain the user-inputted values if the user navigates back to the screen. In order to retain the values the users entered in the displayFieldsUpsertRecords LWC component, this custom navigation footer was created. To have a consistent navigation experience throughout the flow, this footer should be used on any custom screen flows added to the Project Setup Wizard instead of the native Salesforce flow navigation footer.
Used in
Create Reporting Periods
Create Project Geographic Areas
Create Project Thematic Areas
Create Frameworks
Create Implementation Plans
Create Budgets
What does it do
Shows Next, Previous, and Skip buttons for navigation on the screen
Displays Done instead of Next on the last screen
Design Attributes
Name | Description | Expected Values | Example |