• AZHAR BAHRAINWALA
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Need help?
Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AddRelatedRecord: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Discount_percent__c]: [Discount_percent__c] Trigger.AddRelatedRecord: line 14, column 1: []


trigger AccountAddressTrigger on Account (before insert,before update) {
    for(Account a :Trigger.new)
    {
        if(a.Match_Billing_Address__c == true)
        {
            a.ShippingPostalcode = a.BillingPostalcode;
        }
    }
}