function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
The_A-RodThe_A-Rod 

Can't find validation rule content in Force.com IDE

I'm very new to the Force.com IDE and and trying to use Eclipse to find some information.

 

Essentially I need to remove a value from a multi-select picklist, but i think it's mentioned in some validation rules and/or workflow rules. The problem is, we have a lot of both and manually searching using the point-and-click functionality in salesforce is too time consuming.

 

The problem is that when I search for this picklist value which I know exists, nothing appears. Not even the field in which it resides. What could I be doing wrong?

 

The metadata components i downloaded were 'Apex and Visualforce'. Would that metadata be contained in there?

Best Answer chosen by Admin (Salesforce Developers) 
Ashish_SFDCAshish_SFDC

Hi, 

 

Try this, 

The validation rules are under each object -- one thing you could do is just check the boxes next to objects - standard and objects - custom so it downloads all the info about those objects, including their validation rules, like this:
 
There is a clear description screen shot here:
 
 
 
Regards,
Ashish

All Answers

Ashish_SFDCAshish_SFDC

Hi, 

 

The easiest way is to use the Force.com IDE, download all selectable metadata, and then do a full-text search (ctrl-H).

 

Or 

 

MetadataService.MetadataPort service = MetadataServiceExamples.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(fileProperty.fullName);

http://salesforce.stackexchange.com/questions/1614/how-to-search-workflow-rules-or-validation-rules-etc-in-apex-i-e-metadata-searc

 

 

Regards,

Ashish

The_A-RodThe_A-Rod
Thanks.

How do i download all the metadata? As I thought I had!
Ashish_SFDCAshish_SFDC

Hi, 

 

Try this, 

The validation rules are under each object -- one thing you could do is just check the boxes next to objects - standard and objects - custom so it downloads all the info about those objects, including their validation rules, like this:
 
There is a clear description screen shot here:
 
 
 
Regards,
Ashish
This was selected as the best answer
The_A-RodThe_A-Rod
Thanks very much