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
Devendra SawantDevendra Sawant 

Trigger Help

 

Hi,

 

I am a new bie to write a trigger code. I seek some help.

There are four objects namely: Job, Job Task, Schdule Template and Schedule Template Item.

In first relationship Job is Child and ScheduleTemplate is Master where they have lookup relationship.(Job has lookup to Schedule Template)

In second relationship,

Schedule Template (Master) and  Schedule Template Item (Child) : Master-Detail Relationship

When a particular Job is created then i want to save Job Name(which belongs to job) and Schedule Template Item fields into the Job Task object.

Scedule Template can contain many schedule template items.

How i can write a trigger code to implement this functionality??

Cheers,
Devendra S


SF Expert.ax1061SF Expert.ax1061

How Job task is associated with other object?

 

Please brief..

 

 

 

 

 

Devendra SawantDevendra Sawant

Hi,

Job Task is associated with the Job. It has master-detail relationship with Job.

Job(Master) -->Job Task(Detail)

Job Task object has this relationship field and field from Schedule Task.

In trigger, i am first fetching the id of Job.

Using this id i am fetching Schedule Template.

Using this Schedule Template i want to retrive Schedule Template Items. and these retrived items i want to insert into Job Task.

How to write trigger for this process?



Cheers,

Devendra S