I have a requirement to pre-fill some fields when a record is created from a related list. These requirements are different when created from the object itself. Is there a way that I can capture this difference in a before trigger?

  • 1
    Setting aside the use of a list button, I'd think that using the standard 'new' button on a related list would cause the record to have its relationship field populated before getting into the triggers. I'll have to test that out a bit later.
    – Derek F
    May 4 at 10:53
  • The relationship field could be a mandatory lookup or could be a master detail, in which case it has to already be populated before the trigger is invoked (a failure to provide the value would cause a missing required field validation before the trigger is called IIRC).
    – Phil W
    May 4 at 11:21

There is no available data that conclusively tells you how the record creation was initiated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.