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
vibrationvibration 

How can i write a trigger in note standard objects?

How can i write a trigger in note standard object

Best Answer chosen by Admin (Salesforce Developers) 
metaforcemetaforce

People like me who are not in a habit of using tools like Force.com IDE (just because they are too lazy) tend to find hacks which could be run in the browser itself ;)

 

Try this: open up the trigger list of any object (say Account) and create a new trigger from there. The URL will now look like this:

https://ap1.salesforce.com/setup/build/editApexTrigger.apexp?retURL=%2Fp%2Fsetup%2Flayout%2FApexTriggerList&entity=Account

 

Just replace the string 'Account' with 'Note' in the URL so that it becomes

https://ap1.salesforce.com/setup/build/editApexTrigger.apexp?retURL=%2Fp%2Fsetup%2Flayout%2FApexTriggerList&entity=Note

 

and press the Enter key. See if that works for you!

All Answers

Ankit AroraAnkit Arora

One way I know (guess the only way) is :

 

Using Eclipse (Force.com IDE plug-in), right-click on your project & select "New" > "Apex Trigger". In the dialogue window that pops up, there is an "Object" dropdown / picklist, choose the object you want from this list - "Note" or "Attachment" etc. - then choose the "Notes" and save it. Now go to salesforce and click on Setup > App Setup > Develop > Apex Trigger > Your Notes trigger will be displayed there.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

metaforcemetaforce

People like me who are not in a habit of using tools like Force.com IDE (just because they are too lazy) tend to find hacks which could be run in the browser itself ;)

 

Try this: open up the trigger list of any object (say Account) and create a new trigger from there. The URL will now look like this:

https://ap1.salesforce.com/setup/build/editApexTrigger.apexp?retURL=%2Fp%2Fsetup%2Flayout%2FApexTriggerList&entity=Account

 

Just replace the string 'Account' with 'Note' in the URL so that it becomes

https://ap1.salesforce.com/setup/build/editApexTrigger.apexp?retURL=%2Fp%2Fsetup%2Flayout%2FApexTriggerList&entity=Note

 

and press the Enter key. See if that works for you!

This was selected as the best answer