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
Donny ReblitzDonny Reblitz 

Need Help w/ an Apex Trigger

Hello,

Looking for help creating a trigger that updates a custom object, Dispatch__c, related by a mater-detail relationship to the Case object. There are a handful of address fields entered on the Case object that simply need to be referenced on the Dispatch__c object when creating a new Dispatch record. The intent is to have the fields pre-populated with the data from the Case when creating a new dispatch record.

Looking for any guidance the community can provide.

Thanks in advance.
RbnRbn
Hi Donny,

You can make use of Process builder to achieve this functionality.
Need not require to create Apex Triggers.
User-added image

User-added image
Let me know if it you require any further help on this.

Regrds,
Rabi


 
AshishkAshishk
If you are creating new dispatch records from case through related list, you can create custom button on related list, give field id = value from parent case object fields, in button code. When you click on that button, fields will be autopopulated with case record values.