• sooraj babu
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
trigger copyaddresstrigger on Contact (before insert,before update) {

    for(contact address : trigger.new)
    {
    if(address.Copy_Address__c ==True)
    {
    address.OtherStreet = address.MailingStreet ; 
    address.OtherCity   = address.MailingCity;
    address.OtherState = address.MailingState;
    address.OtherPostalCode = address.MailingPostalCode;
    address.OtherCountry = address.MailingCountry;    
    }  
        else
    { address.OtherStreet = null ; 
    address.OtherCity   = null;
    address.OtherState = null;
    address.OtherPostalCode = null;
    address.OtherCountry = null;
    }
}
}
Hi,

I have two text field A & B and one checkbox. I want when i click the check box address from A will get copy to B before saving.
Could you please suggest what should i do. Weather a trigger, Workflow or formula field.

Regards