You need to sign in to do that
Don't have an account?
mannar
<SCRIPT type=text/javascript>function initSelectionInEditor() { setSelectionInEditor('Body', 0, 0) }setContentWindow(window);initSelectionInEditor();</SCRIPT>
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';
}
}
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
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