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)
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
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.
Use metadatatype 'CustomObject'. You will get back a CustomObject with e.g. the 'fields' child objects but also 'validationRules'.