You need to sign in to do that
Don't have an account?
bulk annotation in trigger
Hello,
bulk as an annotation look like to be permitted in a trigger, is there any documentation on the purpose of it ?
For instance, the 2 following are valid
trigger AccountTrigger on Account bulk (before insert){
// Do something
}
trigger AccountTrigger on Account (before insert){
// Do something
}
bulk as an annotation look like to be permitted in a trigger, is there any documentation on the purpose of it ?
For instance, the 2 following are valid
trigger AccountTrigger on Account bulk (before insert){
// Do something
}
trigger AccountTrigger on Account (before insert){
// Do something
}
In bulkification of trigger, you need to ensure that it will run in multiple records passed to it in chunk. There is no annotation for it. For more details on bukify code pls visit - https://developer.salesforce.com/page/Best_Practice%3A_Bulkify_Your_Code
What are you trying to achieve ?
An Apex annotation modifies the way that a method or class is used, similar to annotations in Java. Annotations are defined with an initial @ symbol, followed by the appropriate keyword. To add an annotation to a method, specify it immediately before the method or class definition. For example: There are various other annotations that you can use as per the requirement.
Please mark this as the best answer if this helps
I can't find any documentation about it and it's a valid way of using a trigger.
trigger AccountTrigger on Account bulk (before insert){
// Do something
}
A standard trigger is something like :
trigger AccountTrigger on Account (before insert){
// Do something
}
You can also use the following, please note the part in bold
trigger AccountTrigger on Account bulk (before insert){
// Do something
}
That's the purpose of bulk that I'm after over here.