function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mannarmannar 

Single row trigger not allowed, use the bulk keyword at line 1 column 1

when I try to add it as a New Trigger in the contacts "buttons and links".
trigger ContAutoRegionTrigger on Contact (before insert,before update)
{
If((Trigger.new.MailingPostalcode=='94501' || Trigger.new.MailingPostalcode=='94502')&& (Trigger.new.MailingCountry== 'USA'))
{
Trigger.new.Region__C = 'BAY AREA';
}
else
{
Trigger.new.Region__C = 'north america';
}
}
 
I  get the error as:
Error: Compile Error: Single row trigger not allowed, use the bulk keyword at line 1 column 1
 
 
Regards
Reena
 
 
<SCRIPT type=text/javascript>function initSelectionInEditor() { setSelectionInEditor('Body', 0, 0) }setContentWindow(window);initSelectionInEditor();</SCRIPT>
SaurabhRawaneSaurabhRawane

Reena,

Please use bulk for all your future trigger operations,refer to this link http://wiki.apexdevnet.com/index.php/Recent_Apex_Code_Changes#Bulk_Triggers

Regards,

Saurabh Rawane