You need to sign in to do that
Don't have an account?

Hello Friends, Please help me in apex trigger.
I have two custom object Resource__c and Leave__c. Leave__c has lookup with Resource__c.
In Resource there are two custom field Total_Allocated_Paid_Leaves__C and Total_Used_Paid_Leaves__c.
Where Leave__c object has one custom field Leaves__c.
I want trigger on
If i entered +ve value in Leaves__c (Leave__c's field) it will add in Total_Allocated_Paid_Leaves__C (Resouce__c's field)
and if i enterd -ve value in Leaves__c (Leave__c's field) it will add in otal_Used_Paid_Leaves__c.
In Resource there are two custom field Total_Allocated_Paid_Leaves__C and Total_Used_Paid_Leaves__c.
Where Leave__c object has one custom field Leaves__c.
I want trigger on
If i entered +ve value in Leaves__c (Leave__c's field) it will add in Total_Allocated_Paid_Leaves__C (Resouce__c's field)
and if i enterd -ve value in Leaves__c (Leave__c's field) it will add in otal_Used_Paid_Leaves__c.
Please find the below snippet code:-
Thanks,
Rishabh Bansal
All Answers
Please find the below snippet code:-
Thanks,
Rishabh Bansal
I hope this works for you. If it does, please like it and mark as Best Answer to help others too.
Thank you.