You need to sign in to do that
Don't have an account?
chandra2ravi
Validation rule
Hi,
How to find validation rules on Sobject. through apex code.
Validation rule:
NOT(ISPICKVAL(PRIORVALUE(Industry),'Agriculture'))
regards,
Ravi.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi,
How to find validation rules on Sobject. through apex code.
Validation rule:
NOT(ISPICKVAL(PRIORVALUE(Industry),'Agriculture'))
regards,
Ravi.
As much as i know, we cannot find validation rules written on SObjects.
But you can still see if anyone answers positive on that.
Even i would like to know if there is a way to find that.
It is technically possible through Apex Code, but the time involved would likely far exceed the benefits. You would have to create a custom call-out class to invoke the metadata API. Assuming you did so, the results would be part of the objects/ branch in the return set. In all honesty, it would probably be best to implement this as a third-party service (i.e. invoke a third-party server that then queries the API and returns results). This would lessen the probability of governor limits being reached if implemented in a reasonable protocol.