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
The Online 401kThe Online 401k 

Trigger to copy custom field to standard field

Does anyone know how to write a trigger that would copy a value from a custom field to standard field?


I have never coded with apex before, so sorry if my question doesn't make sense.


We have been using a custom picklist to store certain info about our clients, but custom fields are not available for a PDF merge.

Our app exchange partner has suggested that we develop a trigger to copy the value from the custom field to the currently unused

"Industry" standard field, which is available for merge.

If both fields are on the same object then you could just do that with a workflow rule and a field update, you don't even need a trigger.

I have similar situation , how can write a trigger , rather than the workflow.....any suggestions would be really appreciated...thank you



 What happens if the fields are located, one in the account and the other in the opportunity?  I need this trigger as well but my fields are located in two different objects and cannot be mapped.