function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
parth sachi 7parth sachi 7 

Can we make any field as mandatory via workflow or process Builder ?

If yes HOW ,no then WHY ?
Anthony McDougaldAnthony McDougald
Good Evening Parth,
Hope that your day is off to an amazing start. Unfortunately no, because the said subjects are declarative automation tools. They're meant to process data to complete some other action such as creating or updating records. We believe that you're looking for Validation Rules, which can make fields required based on formula logic that you specify. Hope this helps and please feel free to ask any questions if you need further clarity. May God bless you abundantly.
Best Regards,
Anthony McDougald
Foram Rana RForam Rana R
Hi Parth,

Answer: No, We can't make any field as mandatory via workflow or process Builder.

Reason: Workflow and Process builder comes into the picture when you want to perform some actions like (create Tasks, Email Alerts, Field Updates, Outbound Messages, Posting on Chatter, Quick action, Quick action, Call/trigger Apex code, Invoking another process) based on some criteria.

These are a different way to make a field Mandatory:
  1. Make the field “Required” at the time of field creation by checking the “Required” checkbox.
  2. Make the field Required through Page Layout by checking the “Required ” checkbook in Field Properties.
  3. Validation Rules can also be used to make the field mandatory. In Error Condition Formula, one can use ISBLANK(“FieldName”).
  4. Triggers can be used to make field mandatory. Ex. If a user try to insert the record without the field which is required, we can throw the page massage specifying to fill up the required fields.(Using Trigger.addError()).
  5. One can make field mandatory through Visualforce.(If the field is getting referenced) by setting the required attribute in <apex:inoutField> to True.
     
Hope this helps you.
If this helps kindly mark it as solved so that it may help others in the future.

Thanks & Regards,
Foram Rana