• Armando Guzman
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi Guys

 

I got this error when i tray to deploy a small triger i created, seem works fine in sanbox

any ideas

 

The code is:

 

1
2
3
4
5
6
7
8
9
10

trigger Update_region on Account (before insert, before update) {
for (Account a : Trigger.new) {
  Region__c[] rgs = [Select Id, state__c From Region__c Where postal_code__c =:a.BillingPostalCode Limit 1];
  if (rgs.size()!=0){
        a.Region__c = rgs[0].Id;
        a.Post_code_del__c = rgs[0].state__c;
         }
        
     }
 }

Thanks in advance

Hi Guys

 

I got this error when i tray to deploy a small triger i created, seem works fine in sanbox

any ideas

 

The code is:

 

1
2
3
4
5
6
7
8
9
10

trigger Update_region on Account (before insert, before update) {
for (Account a : Trigger.new) {
  Region__c[] rgs = [Select Id, state__c From Region__c Where postal_code__c =:a.BillingPostalCode Limit 1];
  if (rgs.size()!=0){
        a.Region__c = rgs[0].Id;
        a.Post_code_del__c = rgs[0].state__c;
         }
        
     }
 }

Thanks in advance