Different ways to create Triggers in Salesforce?

Author - Deepika Saini
25.09.2018
|
0 Comments
|

What are the different ways to create Triggers in Salesforce?

There are three ways of creating a trigger depending upon the type of object in salesforce.

1. Trigger on Standard Object (which have visible property):-
a) Go to Setup->Customize.
b) Open any Standard object (like Accounts) by clicking on arrow button and click on Trigger link in under selected Object.
c) Click on new button.

2. Trigger on Custom object:-
a) Go to Setup-> Create->Objects.
b) There will be a list of custom objects, select any custom object then detailed definition of the custom object will be open which contain trigger section, click on New button in Trigger section.

3. Trigger on Standard Object (which does not have visible property like Attachments):-
a) Go to developer console.
b) Go to New-> Apex Trigger.
c) Select the sObject name from drop down (that is Attachment)
d) Specify the name and save.

The best way is the third one where you can create the trigger related to any object whether it has the property of visibility or not.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *