Create Custom Entity Field – Purchasing Checkbox
- Navigate to Customization > Lists, Records, & Fields > Entity Fields > New
- Label: Enter Purchasing
- Type: Select Check Box
- Store Value: Enter Checkmark
- Click Applies To
- Vendor: Enter Checkmark
- Click Display
- Subtab: Select Main
- Click Save
Create Workflow
- Navigate to Customization > Workflow > Workflows > New
- Basic Information:
- Name: Enter Set Contact information Mandatory as per Purchasing Checkbox
- Record Type: Select Vendor
- Execute as Admin: Enter Checkmark
- Release Status: Select Released
- Keep Instance and History: Select Always
- Enable Logging: Enter Checkmark
- Initiation:
- Event Based: Enter Checkmark
- Event Definition:
- On Create: Enter Checkmark
- On View or Update: Enter Checkmark
- Trigger Type: Select -All-
- Click Save
- Click State 1
- Bottom right corner: Click New Action
- Click Set Field Mandatory
- Basic Information:
- Trigger On: Select Before Record Load
- Parameters:
- Field: Select the specific field
- Note: Select the field which should be mandatory or not mandatory.
- Mandatory: Enter Checkmark
- Condition: Select Visual Builder
- Condition: Click Launcher Icon
- Workflow Condition:
- Field: Select Custom Check Box
- Compare Type: Select Checked
- Click Add
- Click Save
- Click Save
- Top left corner: Click New State
- Double-click State 1
- Click Transitions
- Click New Transition
- Basic Information:
- To: Select State 2
- Click Save
- Click State 2
- Bottom right corner: Click New Action
- Click Set Field Mandatory
- Basic Information:
- Trigger On: Select After Field Edit
- Parameters:
- Field: Select the specific field (Email)
- Note: Select the field which should be mandatory
- Mandatory: Enter Checkmark
- Triggering Client Fields:
- Triggering Client Fields: Select Custom Check Box
- Condition: Select Visual Builder
- Condition: Click Launcher Icon
- Workflow Condition:
- Field: Select Custom Check Box
- Compare Type: Select checked
- Click Add
- Click Save
- Click Save
- Click State 2
- Bottom right corner: Click New Action
- Click Set Field Mandatory
- Basic Information
- Trigger On: Select After Field Edit
- Parameters
- Field: Select the same specific field (phone)
- Note: Select the same field defined in the workflow action earlier
- Mandatory: Remove Checkmark
- Triggering Client Fields:
- Triggering Client Fields: Select Custom Check Box
- Condition: Select Visual Builder
- Condition: Click Launcher Icon
- Workflow Condition:
- Field: Select Custom Check Box
- Compare Type: Select not checked
- Click Add
- Click Save
- Click Save
- Repeat the step for Address field also
- Double-click State 2
- Do Not Exit Workflow: Enter Checkmark
- Click Save
Note: After the workflow is saved, navigate to the Vendor record and enter a checkmark in the custom Checkbox(Purchasing) field. This will render one of the specific fields mandatory (as defined in the workflow). Removing the checkmark will render the same field not mandatory (as defined in the workflow).