I need to list all the Properties of Validation Rule like Status, Description, Error Message, Error Formula inside the Salesforce through Metadata API.
As per my understanding, we can retrieve only fullName property via Metadata API(using 'listmetadata' call). If my understanding is wrong and we can get all the properties, I would request you to provide me the information which can help me to implement this in my code.
Here is the code which I am using currently:
MetadataService.MetadataPort service = createService();
List<MetadataService.ListMetadataQuery> queries = new List<MetadataService.ListMetadataQuery>();
MetadataService.ListMetadataQuery queryValidationRule = new MetadataService.ListMetadataQuery();
queryValidationRule.type_x = 'ValidationRule';
queries.add(queryValidationRule);
MetadataService.FileProperties[] fileProperties = service.listMetadata(queries, 25);
for(MetadataService.FileProperties fileProperty : fileProperties) {
system.debug('Validation Rule Name'+fileProperty.fullName);
}