• Ngô Hoàng Dương
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi All,
Please help in resolving the field not writable issue being thrown in below code . The object and filed level sharing is being set appropriately

trigger AccountAddressTrigger on Account (before insert , before update) {
    System.debug('Welcome to the Triggers World');
    List<Account> lstAccount=new List<Account>();
    For (Account actNew :Trigger.New)
    {
    if(actNew.BillingAddress !=NULL && actNew.Match_Billing_Address__c==true)
    {
        actNew.ShippingAddress=actNew.BillingAddress;
    }
        lstAccount.add(actNew);
    }
    
    insert lstAccount;
    
}