• Omo Phalayi
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi All, 
Please, I am trying to update an account field using a trigger based on recordtype. The requirement is if  the Reocrdtype is AccOneA and the Active field on the Account is "Yes" update the description. 
Please see my code below

trigger AccountTriggerB on Account (before insert, before Update) {
    for(Account Acc:Trigger.New){
        if(Acc.RecordType.DeveloperName=='AccOneA' && Acc.Description ==Null){
            Acc.Description ='Please lets us know if there is any concern.Thanks';
        }
    }
    
}
 
Hi All, 
Please, I am trying to update an account field using a trigger based on recordtype. The requirement is if  the Reocrdtype is AccOneA and the Active field on the Account is "Yes" update the description. 
Please see my code below

trigger AccountTriggerB on Account (before insert, before Update) {
    for(Account Acc:Trigger.New){
        if(Acc.RecordType.DeveloperName=='AccOneA' && Acc.Description ==Null){
            Acc.Description ='Please lets us know if there is any concern.Thanks';
        }
    }
    
}