I need to populate a record with the values of a parent record before insert. These fields mirror some fields from the parent record, but should be editable by the user (so we can't use formulas).
Because this runs before insert, I'm unable to query the relationship fields the standard way (SELECT ParentObject.Name FROM ... ) because the trigger record ids don't exist yet.
This leaves me with some options:
1- Keep track of the related record ids, query them separately, and do the joins manually later in the code. This requires a lot of boilerplate code so I'm not too excited about it.
2- Do this in a @future method, however I need the field values to be populated before any other logic can run
3- Do it after update, by putting a dummy workflow that fires all the time and re-fires the trigger context. Not too excited either because of recursion.
Are there option/better options?