Biswajeet is my Name, Success is my Aim and Challenge is my Game.
Risk & Riding is my Passion and Hard Work is my Occupation.
Love is my Friend, Perfection is my Habit and Smartness is my Style.
Smiling is my Hobby, Politeness is my Policy and Confidence is my Power.
public class ContactProcessBuilderHandler {
@InvocableMethod
public static void sendNotification(List<String> contactIds) {
sendEmailToContacts(contactIds);
}
@future //Use callout = true, for callouts
public static void sendEmailToContacts(List<String> contactIds) {
//Write your business logic
}
}
Ternary operator is a one liner replacement for if-then-else statement. If x, a Boolean, is true, y is the result. Otherwise z is the result. Note that x cannot be null.
Example:
Boolean isLeapYear = true;
//Using Ternary Operator
String msg = isLeapYear ? 'It is a leap year.' : 'It is not a leap year.';
System.debug('Message - ' + msg);
If “isLeapYear” is true, assign the message value to “It is a leap year”, else assign message value to “It is not a leap year”.