Skip to main content
Viswa Chaitanya (ITC) 님이 #Sales And Marketing에 질문했습니다
Hello All

 

I am new to salesforce and learning triggers currently. Can you please help me in the below requirement. 

 

Consider I have two fields ( Field A and Field B)  on Object-X. On any record under Object-X, whenver I enter a value on Field A and click on update,this value should get updated on Field B as well. (I believe it is using Trigger.New). Kindly provide the code (Trigger and class)  if possible.

 

Thanks in Advance. 

 

Car

 

  
답변 5개
  1. 2019년 7월 18일 오전 10:50
    trigger fieldupdate on Account (before insert,before update) {

     

        for(account a:trigger.new){

     

            

     

            if(a.field2__c != '  '){

     

        

     

        a.field1__c = a.field2__c;

     

        

     

            }

     

        }

     

    }

     

    you can also do this by creating workflow or process builder .

     

    if this helps please select this as best answer

     

     
0/9000