Activity Forums Salesforce® Discussions How many ways we can made field is required in Salesforce?

  • Prachi

    Member
    September 24, 2019 at 5:09 am

    Hi,

    There are various ways to make field required in salesforce-

    1.Make the field “Required” at the time of field creation by checking the “Required” check box.
    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 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.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos