Configuration for Salesforce Metadata Rules
Learning Objectives:
After reading this guide, you'll be able to:
Create a custom Salesforce metadata Quality Profile
Add Salesforce metadata types for a Salesforce Org analysis
Add Salesforce metadata suffixes/extension for the analysis
Create a Custom Salesforce Quality Profile
This article explains how to enable the Salesforce Metadata rules in the CodeScan Cloud environment.
Login to your CodeScan account.
Click on the
Quality Profiles
on your main organization page and then click onCreate
button.Create Quality Profiles Create a new rule by selecting the language as
Salesforce Metadata
and name your new profile. You can choose theParent rule
as an optional.Create New Quality Profile Once you create the new quality profile, you will be navigated to a new page where you need to click on
Activate More
button on the left.Activate More Now, make sure on your left side of the page where you see the name of the rule you created; it is marked as inactive.
Inactive Make sure that you activate the four rules referenced below by clicking on the
Activate
button beside the rule.Record Type ID is Missing
Object Permissions should not be permissive
Enforce Org Security Settings
Custom fields must have a description field
Once activated, select the
Active
button under filters (beside the rule’s name).Active Rule
Adding Salesforce metadata types for Salesforce Org analysis
To enable downloading metadata for your Salesforce project, you will need to change some project settings. Remember that the following will only work with code being pulled from Salesforce.
If you are using a git repository or any other method of scanning, please skip to the next step.
Once you are done with the activation of the custom rule, go to the project with the rules you wish to run the analysis, and click on
Project Settings > General settings
.General Settings Click the
CodeScan
tab on the left to open the CodeScan specific settings and access theCodeScan Cloud Download Types
.

The default values are ApexClass, ApexComponent, ApexPage, ApexTrigger, AuraDefinitionBundle, and LightningComponentBundle.
CodeScan is capable to analyze all metadata types supported by Metadata API of Salesforce. Refer to the Salesforce Developer API documentation to find the supported metadata types.
Under
CodeScan Cloud Download Types
, enter the Salesforce metadata types needed for the analysis, then select theSave
button.

Adding Salesforce metadata suffixes/extensions for the analysis
On the
CodeScan
section, scroll down toScope
, where you seeMetadata File Suffixes
.Add the suffixes for the files to analyze.

Click
Save
.Run the analysis again by navigating to the
Project Settings > Project Analysis
menu and selecting theRun Manual Analysis
button. If your metadata files contain issues, you will see that reflected in the issues list.Run Manual Analysis
Additional Support
If you are still having trouble setting up metadata rules after reading the complete documentation, please contact the support team, and we'll be happy to help.
Last updated
Was this helpful?