I would appreciate some best practice advice here -
I have an insert trigger to populate a field in the record being inserted into a custom object with the value of a field in the parent object.
From other posts I learned that trigger.new cannot see any related fields.
Taking the value from a formula field on my custom object would normally be a choice but maximum number of object references has been reached due to high number of formula fields so I can't create another.
So I need to look up the value with SOQL and store it in a map with the Id of the record being inserted.
Which means that my before insert trigger must now be an after insert in order to know the Id.
If I query into a map and then update the field on the record being inserted I then need to issue an update DML statement, so in order to populate my field I need an insert and an update.
Seems inefficient - is that the only way?