Salesforce Apex Trigger to Create a Simple Calculator
In this example, you will learn to create a simple calculator from a apex trigger in salesforce development.
Firstly we have to create an object of name " Calculater__c".

This apex trigger takes an picklist arithmetic operator " operator__c " +, -, *, / and two fields operands " Value_1__c " and " Value_2__c " from the user. Then, it performs the calculation on the two operands depending upon the operator entered by the user.

Code :

Comments
Post a Comment