Salesforce Apex Trigger To Calculate Percentage
Firstly we have to create an object of name “ MPC__c“.

This apex trigger takes three fields
1. Percentage_scored__c, 2. Percentage_total_marks__c, 3. Output_of_Percentage__c.



Percent means per cent (hundreds), i.e., a ratio of the parts out of 100. The symbol of percent is %. We generally count percentage of marks obtained, return on investment etc. Percentage can go beyond 100% also.
For Example − assuming that we have total and a part. So we say what part is what percent of total and should be calculated as −
percentage = ( part / total ) × 100

Comments
Post a Comment