+ Start a Discussion
Staci CaraStaci Cara 

soql validation rules

Hi,

I would lik to query all validation rules that contain a condition with profiles. Is this possible?

Thanks in advance!

Best Answer chosen by Staci Cara
v varaprasadv varaprasad

Hi Staci,

As per myunderstaninding, We cannot Query validation rules that contain a condition with profiles.

We can fetch validation rule details only : 


 

SELECT Id, ValidationName, Active, Description, EntityDefinition.DeveloperName, ErrorDisplayField, ErrorMessage FROM ValidationRule
 

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_validationrule.htm


Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.

Thanks
Varaprasad
@For SFDC Support: varaprasad4sfdc@gmail.com
Blog: http://salesforceprasad.blogspot.com/

Salesforce latest interview questions  :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1

 

All Answers

v varaprasadv varaprasad

Hi Staci,

As per myunderstaninding, We cannot Query validation rules that contain a condition with profiles.

We can fetch validation rule details only : 


 

SELECT Id, ValidationName, Active, Description, EntityDefinition.DeveloperName, ErrorDisplayField, ErrorMessage FROM ValidationRule
 

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_validationrule.htm


Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.

Thanks
Varaprasad
@For SFDC Support: varaprasad4sfdc@gmail.com
Blog: http://salesforceprasad.blogspot.com/

Salesforce latest interview questions  :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1

 

This was selected as the best answer
Bhargavi TunuguntlaBhargavi Tunuguntla
Hi

We can't use fields used in vadilidation rule for condition checking in query.

We can only refer the below fields of ValidationRule object in workbench:

/services/data/v35.0/tooling/query?q=Select Id,Active,Description,EntityDefinition.DeveloperName,ErrorDisplayField, ErrorMessage From ValidationRule

Refer the below link for more details:

https://developer.salesforce.com/forums/#!/feedtype=SINGLE_QUESTION_DETAIL&dc=APIs_and_Integration&criteria=OPENQUESTIONS&id=906F00000005KekIAE

Hope this will be helpful.

Thanks
Bhargavi.

 
Miles Smith 5Miles Smith 5
for me, this thread solution worked  https://salesforce.stackexchange.com/questions/164931/is-there-a-way-to-call-javascript-after-action-on-visualforce-page​ (http://for me, this thread solution worked https://salesforce.stackexchange.com/questions/164931/is-there-a-way-to-call-javascript-after-action-on-visualforce-page​ with regards)
with regards
https://akinator.ooo/ https://xender.vip/ https://kik.onl/