function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chanti kchanti k 

i need update currency is Pound , when country is set to uk

HI,
i need update currency is Pound , when ever i can set  country is set to uk,
how to i can achive this by using this triggerr 

Thanks,
Chnati
Maharajan CMaharajan C
Hi ,

Try like below:

trigger Updatecurrency on User (before insert, Before Update) 
{
for(User u:trigger.new)
{
IF (u.country=='UK') 
{
u.DefaultCurrencyIsoCode='GBP';
}
}
}

Thanks