Apex enum DataType Salesforce

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


Season southernHemisphereSeason = Season.WINTER;

Season northernHemisphereSeason = Season.SUMMER;

getSouthernHemisphereSeason(northernHemisphereSeason);

system.debug('northernHemisphereSeason'+northernHemisphereSeason);

public Season getSouthernHemisphereSeason(Season northernHemisphereSeason) {


    if (northernHemisphereSeason == Season.SUMMER) northernHemisphereSeason=southernHemisphereSeason;

    return northernHemisphereSeason;

     

}

Comments

Popular posts from this blog

Multi currency in Salesforce - Revenue Cloud Advance - Revenue Lifecycle Management

Create the Callout Step in DRO - Salesfroce - Dynamic Revenue Orchestrator

Apex Triggers - 15 (Amazon Interview Question)