I have a field that is filled by file import, so I need to check if this field was fill by hand or imported. Is there any way to implement a validation rule with a condition that verifies whether or not the input of a sObject field was given by the keyboard?
-
2I don't think that's possible. If you looked at who was responsible for the imports (CreatedById) you could somehow filter by that. Visualforce & Lighting support onKeyUp & onKeyDown but I don't think that the standard platform functionality allows you to see whether the text entry is by keyboard or not.– akarnidCommented Jun 5, 2019 at 14:10
Add a comment
|
1 Answer
No, a validation rule cannot determine if the source of a DML operation was from the UI or API. It is theoretically possible to determine some contexts, but you would need to write a trigger to get that level of detail.