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
myforcedotcommyforcedotcom 

Modify Trigger Template or Class Template

When you create a new trigger using the Force.com IDE, you get a file that looks like this:

 

trigger AccountTrigger on Account (after insert, after update) {

}

 

Is there a way to modify the template that is used to generate a trigger so when I create the trigger it would look like:

 

trigger AccountTrigger on Account (after insert, after update, before insert, before update) {

if(trigger.isInsert && trigger.isAfter){

//implement code

}

 

  if(trigger.isUpdate && trigger.isAfter){

   //implement code

  }

}

 

 

Pradeep_NavatarPradeep_Navatar

In my opinion it is not possible because this is not exposed and is automatically handled by Salesforce .

myforcedotcommyforcedotcom

Thanks Pradeep

I posted it on the Idea Exchange under Developer Tools.

 

https://sites.secure.force.com/success/ideaView?c=09a30000000D9xtAAC&id=08730000000YR6mAAG