You need to sign in to do that
Don't have an account?
test pawan
How to write Test class for this Trigger
trigger TimeZone on Contact (before insert, before update) {
for (Contact cc : Trigger.new)
{
if(cc.User_Place_Time_Zone__c =='GMT+05:30')
{
if(CC.Customer_Place_Time_Zone1__c=='GMT+01:00')
{
cc.Customer_Place_Time__c = System.Now()- (0.1875);
}
if(CC.Customer_Place_Time_Zone1__c=='GMT+02:00')
{
cc.Customer_Place_Time__c = System.Now()- (0.14583);
}
if(CC.Customer_Place_Time_Zone1__c=='GMT+03:00')
{
cc.Customer_Place_Time__c = System.Now()- (0.1042);
}
}
}
Hi,
Try the below code: