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
ImaghrooriImaghroori 

Best Practices Object conversion

Hello all,

I was wondering what the best practice is for doing the following:

    I have a custom object with populated fields call it "Applicant". When "something" happens I want to populate the matching fields in another custom object "Participant" with the fields from the Applicant object.  These custom objects overlap greatly in the information they store, but have distinct business reasons for existing, and different field names.

What would be the best way in apex to move the values from one object to another?

Currently I am querying "Applicant" then creating a new Participant Object and individually assigning the fields.
Exp (obviously not syntactically correct):     App a = query result.
             Participant p= [ name = a.name, address = a.address ...etc]
mtbclimbermtbclimber
It's hard to tell what you are trying to do exactly. 

Are you using triggers or is this an explicity invocation of apex you are after?