Activity › Forums › Salesforce® Discussions › What is Enums in Salesforce Apex?

  • Anuj

    Member
    February 6, 2020 at 12:30 PM

    Hi Arun,

    An enum is an abstract data type with values that each take on exactly one of a finite set of identifiers that you specify. Enums are typically used to define a set of possible values.

    For Example.

    public enum Season {WINTER, SPRING, SUMMER, FALL}

    Season e = Season.WINTER;

    Season CheckSeason(Season e) {
    if (e == Season.SUMMER){
    return e;
    }
    }

Log In to reply.

Popular Salesforce Blogs

Steps to Connect Pardot to Salesforce

Steps to Connect Pardot to Salesforce

Blog in

Steps to Integrate Salesforce and Pardot: There are some steps to install Pardot in salesforce 1- Click on this link https://login.salesforce.com/?ec=302&startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t1W000000U7P8(production) https://test.salesforce.com/?ec=302&startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t1W000000U7P8 (sandbox) 2- After…

Popular Salesforce Videos