Set Field Mandatory via Workflow if Checkbox Is True and Not Mandatory if Checkbox Is False

Create Workflow

  1. Navigate to Customization Workflow Workflows New 
  2. Basic Information:
    • Name: Enter Set Field Mandatory as per Check Box
    • Record Type: Select Vendor
    • Execute as Admin: Enter Checkmark
    • Release Status: Select Released
    • Keep Instance and History: Select Always 
    • Enable Logging: Enter Checkmark
  3. Initiation:
    • Event Based: Enter Checkmark
  4. Event Definition:
    • On Create: Enter Checkmark
    • On View or Update: Enter Checkmark
    • Trigger Type: Select -All- 
  5. Click Save
  6. Click State 1
  7. Bottom right corner: Click New Action
  8. Click Set Field Mandatory
  9. Basic Information:
    • Trigger On: Select Before Record Load
  10. Parameters:
    • Field: Select the specific field
      Note: Select the field which should be mandatory or not mandatory.
    • Mandatory: Enter Checkmark 
  11. Condition: Select Visual Builder
    • Condition: Click Launcher Icon
    • Workflow Condition:
      • Field: Select Custom Check Box
      • Compare Type: Select Checked
      • Click Add
      • Click Save
  12. Click Save
  13. Top left corner: Click New State
  14. Double-click State 1
  15. Click Transitions
  16. Click New Transition
  17. Basic Information:
    • To: Select State 2
  18. Click Save
  19. Click State 2
  20. Bottom right corner: Click New Action
  21. Click Set Field Mandatory
  22. Basic Information:
    • Trigger On: Select After Field Edit
  23. Parameters:
    • Field: Select the specific field
      Note: Select the field which should be mandatory
    • Mandatory: Enter Checkmark
  24. Triggering Client Fields:
    • Triggering Client Fields: Select Custom Check Box
  25. Condition: Select Visual Builder
    • Condition: Click Launcher Icon
    • Workflow Condition:
      • Field: Select Custom Check Box
      • Compare Type: Select checked
      • Click Add
      • Click Save
  26. Click Save
  27. Click State 2
  28. Bottom right corner: Click New Action 
  29. Click Set Field Mandatory
  30. Basic Information
    • Trigger On: Select After Field Edit
  31. Parameters
    • Field: Select the same specific field
      Note: Select the same field defined in the workflow action earlier
    • Mandatory: Remove Checkmark 
  32. Triggering Client Fields:
    • Triggering Client Fields: Select Custom Check Box
  33. Condition: Select Visual Builder
    • Condition: Click Launcher Icon
    • Workflow Condition:
      • Field: Select Custom Check Box
      • Compare Type: Select not checked
      • Click Add
      • Click Save
  34. Click Save
  35. Double-click State 2
  36. Do Not Exit Workflow: Enter Checkmark
  37. Click Save
  38. Click State 2
  39. Bottom right corner: Click New Action 
  40. Click Return User Error
  41. Basic Information
    • Trigger On: Select Before Record Submit
  42. Parameters
    • Text: Enter Error message
    • Mandatory: Remove Checkmark 
  43. Condition: Select Visual Builder
    • Condition: Click Launcher Icon
    • Workflow Condition:
      • Field: Select Custom Check Box
      • Compare Type: Select checked
      • Click Add
      • Field: Select the specific field
        Note: Select the field which should be mandatory or not mandatory
      • Compare Type: Select Empty
      • Click Add
      • Click Save
  44. Click Save

Leave a comment

Your email address will not be published. Required fields are marked *