Skip to main content

Can some help me to optimize below Apex code

1 answer
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    Jul 12, 2023, 11:49 AM

    Hello @Anvitha Shetty,

    First you probably may set up all Jan_Manual_FY__c & Jan_Manual_Next_FY__c to handle null values as 0. Then the related code (if null then 0) should be optional.

    Second the part checking for trimester should maybe refactored in a loop (with the start year going from current year+0 to current year+1, and inside the start month going from 1 to 12)

    Hope it helps

    BR

    Eric

0/9000