You need to sign in to do that
Don't have an account?

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]
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]
Are you using triggers or is this an explicity invocation of apex you are after?