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
Leena Vs 6Leena Vs 6 

Upon Account Creation if Industry is not null and having value as ‘Media’ then populate Rating as Hot.

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Leena,

Can you confirm with which you need to achieve it. Apex Trigger or Flow?

Thanks
 
Shri RajShri Raj
trigger setAccountRating on Account (before insert, before update) {
    for (Account acc : Trigger.new) {
        if (acc.Industry != null && acc.Industry == 'Media') {
            acc.Rating = 'Hot';
        }
    }
}