1

So i am trying to fetch validation rule for a specific object, is there any API call via which i can achieve the same ?

Already done with fetching validation rule for all objects via

listMetadata(ListMetadataQuery[] queries, double asOfVersion)

1

You can get the particular validation rules for an object by fetching the object definition with readMetaData. You have to fetch the complete object. It's not possible to get only the validation rules.

https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_readMetadata.htm

Use metadatatype 'CustomObject'. You will get back a CustomObject with e.g. the 'fields' child objects but also 'validationRules'.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.