function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shubam rajorashubam rajora 

hi , i heed help regarding formula filed



hi , i heed help regarding formula filed
this is the formula for understanding       IF(Text(APTS_Discount_Type__c) = 'Tier Discount', IF(MAX(APTS_Discount_Tier_1_c,APTS_Discount_Tier_2c,APTS_Discount_Tier_3c,APTS_Discount_Tier_4c,APTS_Discount_Tier_5_c)> 0, MAX( APTS_Discount_Tier_1_c, APTS_Discount_Tier_2c , APTS_Discount_Tier_3c , APTS_Discount_Tier_4c, APTS_Discount_Tier_5_c ), MAX( APTS_Agreement_Group_r.APTS_Discount_Tier_1c, APTS_Agreement_Groupr.APTS_Discount_Tier_2c, APTS_Agreement_Groupr.APTS_Discount_Tier_3c, APTS_Agreement_Groupr.APTS_Discount_Tier_4c, APTS_Agreement_Groupr.APTS_Discount_Tier_5_c)), IF(Text(APTS_Discount_Type__c) = 'Tier Discount % + Scaled', IF(MAX(APTS_Discount_Tier_1_c+APTS_Scaled_Discount_Percent_Tier_1c, APTS_Discount_Tier_2c+APTS_Scaled_Discount_Percent_Tier_2c, APTS_Discount_Tier_3c+APTS_Scaled_Discount_Percent_Tier_3c, APTS_Discount_Tier_4c+APTS_Scaled_Discount_Percent_Tier_4c, APTS_Discount_Tier_5c+APTS_Scaled_Discount_Percent_Tier_5_c)>0, MAX( APTS_Discount_Tier_1_c + APTS_Scaled_Discount_Percent_Tier_1c , APTS_Discount_Tier_2c + APTS_Scaled_Discount_Percent_Tier_2c , APTS_Discount_Tier_3c + APTS_Scaled_Discount_Percent_Tier_3c , APTS_Discount_Tier_4c + APTS_Scaled_Discount_Percent_Tier_4c , APTS_Discount_Tier_5c + APTS_Scaled_Discount_Percent_Tier_5_c ), MAX(APTS_Agreement_Group_r.APTS_Discount_Tier_1c+APTS_Agreement_Groupr.APTS_Scaled_Discount_Tier_1c, APTS_Agreement_Groupr.APTS_Discount_Tier_2c+APTS_Agreement_Groupr.APTS_Scaled_Discount_Tier_2c,APTS_Agreement_Groupr.APTS_Discount_Tier_3c+APTS_Agreement_Groupr.APTS_Scaled_Discount_Tier_3c,APTS_Agreement_Groupr.APTS_Discount_Tier_4c+APTS_Agreement_Groupr.APTS_Scaled_Discount_Tier_4c,APTS_Agreement_Groupr.APTS_Discount_Tier_5c+APTS_Agreement_Groupr.APTS_Scaled_Discount_Tier_5_c)), 0)) ​-----------------------------------formula ends here------------- for ->    max tier discount%  ​      max(tier1+tier2+tier3+tier4+tier5) + max((Scaled+tier1)+(Scaled+tier2)+(Scaled+tier3)+(Scaled+tier4)+(Scaled+tier5)))                                                                                                                                                                 __________________________________________now what is case  ->  if all the value of (tier1 ) or( Scaled + tier 1 ) becomes null then the value should be fetched from  agreement lione items          ( we need mainly on the tier +Scaled     it takes from the agreement group )                                                                                                                      what modification can be done in code or how can it be done ? more over if tier1 is null it should not chek tier2 or any other tiers
only if tier1 has some value then it will check tier2 ....
similarly like tier1 it will check tier2 is null or have some value if the value is there it checks for tier3 if not it will check the maximum value of tier1 and tier2 
similarly for scaled+tier thing
 
#Apex  #Apex Class  #Formula Field  #Formulas  #Formula  #Formulas & Validations #Trailhead #Answer Community
Show Less
0 likes