You need to sign in to do that
Don't have an account?
Marco_Maltesi
trigger of creation record
Hi,
I haven't written an Apex trigger before, so I'm looking for an example of a trigger that will create a record.
I've got a 2 objects : Mission , Project
Each time a mission or a projet is created or modificated , I'd like to create a record in my custom object Jobs.
millions thanks!!!
How to write a trigger in Apex
http://sfdcdownunder.blogspot.jp/2009/02/how-to-write-trigger-in-apex.html
if you want to insert some records, use "insert" instead,
the doc is here:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers.htm
Hi
Trigger is at object level.
If you want to write trigger on 2 objects then you have to write 2 triggers separately for each object.
First go through the documentation provide by SF about Triggers so that you will have get some idea about triggers
Find the below link
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_context_variables.htm
And find the below code which will be guide to write trigger might be helpful to know the Body and how write trigger.
I have written on Mission Object(not tested). You do the same for Project Object
Mark it as Resolved if the reply helps you.