So I have a scenario where i need to fire validation in UI but the same validation should not run in any where in the code(n number classes).
The reason for doing this is that my system is stabil and I do not want to hinder DML operation on Account by introducing the new validations. There are many places in code where Account get update and by introducing this validation it will stop those code.
What I need is that new validation should fire when a record is saved from UI but do not fire then there is DML from code behind.
Looking forward to it!!
Can this work! - Detect by using apexpage reference if a context originated from VF page and if yes then make a check box true on the record and make my validation check that?