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
shraddha kawaneshraddha kawane 

Trigger :

Hi,

I have total 5 objects , i need to write a trigger & i am new to trigger basics ? can anyone help please:

Objects:
1. purchase order
2. Job
3. Variation
4.Job item
5.code
now the problem is:

1.Purchase order(D) is detail of Job(M)
2.Variation(D) is detail of Job(M)
3.Job item(D) is detail of Variation(M)
4. Code is Lookup to Job Item(field name is item code)

so I need to write a trigger update the field called Count on purchase order which will have the count of Job item where Item code is 12
Could anyone help me out how to achieve this using maps?
pconpcon
I would recommend reading over some of the following articles about how to get started on triggers.  If you then have any specific question or problems when writing your trigger I can help you.

http://blog.deadlypenguin.com/blog/2012/02/13/classifying-triggers-in-salesforce/
http://blog.deadlypenguin.com/blog/2014/07/23/intro-to-apex-auto-converting-leads-in-a-trigger/
http://www.sfdc99.com/2013/05/12/example-how-to-write-a-simple-apex-trigger-2/