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
adroitusadroitus 

Formula needed for Remaining Leave in Leave Application

Hello Developer!!

 

  • How to calculate remaining leave for leave application.(As we have start date & end date and from this we can calculate total number of leave days now I need to calculate remaining leave ..Assume remaining leave = 21 days)
  • so I think i need a formulA to  CALCULATE remaining Leave..

plz help me...

 

 

 

Thanks & Regards

Ashish Agrawal

Rahul SharmaRahul Sharma

create a field with a formula, 

 

IF(End_Date__c > Start_Date__c, End_Date__c - Start_Date__c, null)

hope it helps.

adroitusadroitus

Thanks Rahul for u r response .

 

 i have to use  trigger to save the remaining leave so that when a particular employee again apply for a leave then its leave automatically deducted form remaining leave .  For that i need a apex code..

 

 

I am new in apex code...

 

If u can help me it will be gr8 support for me...

Rahul SharmaRahul Sharma

can you post you trigger