• #39392
     Anjali #7
    Forcetalks

    How many ways we can make field required in Salesforce?

    How many ways we can make field required in Salesforce?

     

    #39393
    Forcetalks

    Hi Anjali,

    Different ways to make field mandatory :

    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.

    #40924
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    Use addError() method in trigger to through error if that field is empty.

    Hope this helps.

    #41269
    Forcetalks

    Let say you want to make contact field required.

    Edit the Contact page layout. Hover over the Title field and click on the Wrench icon. Then click Required checkbox and save.

    Setup | Customize | Contacts | Page Layouts

    Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?