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?
-
1Setting 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 FMay 4, 2021 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 WMay 4, 2021 at 11:21
Add a comment
|
1 Answer
There is no available data that conclusively tells you how the record creation was initiated.