Problem
When viewing product configurations in the Solution Console or on order records, some product names appear to be missing, blank, or display incorrectly. The configuration exists and functions normally, but the name field appears empty or truncated in certain views.
This issue typically manifests as:
- Empty or blank product names in the Solution Console tree view
- Product configurations showing as unnamed in reports or list views
- Inconsistent display of product names across different pages
Root Cause
The product configuration's Name field contains trailing whitespace characters (spaces, tabs, or other invisible characters) at the end of the value. While Salesforce stores the value with the trailing space, various UI components trim or handle whitespace differently, causing inconsistent display behavior.
This often occurs when:
- Product names are imported from external systems that include trailing spaces
- Manual data entry includes accidental trailing spaces
- Copy-paste operations from other systems introduce hidden whitespace characters
Resolution
Step 1: Identify Affected Product Configurations
- Navigate to Setup > Developer Console
- Click Query Editor
-
Run the following SOQL query to find configurations with trailing spaces:
sql SELECT Id, Name, cscfga__Product_Definition__r.Name FROM cscfga__Product_Configuration__c WHERE Name LIKE '% ' -
Review the results to identify affected records
- Note the configuration IDs for the next step
Step 2: Remove Trailing Spaces from Configuration Names
- Navigate to Setup > Data Loader (or use Workbench)
- Select Export to download the affected records
- In the exported CSV file:
- Open in a text editor or Excel
- For each
Namevalue, remove any trailing spaces -
Use Find & Replace if needed: Find
" "(space at end), Replace with"" -
Save the updated CSV file
- Use Data Loader > Update to upload the corrected records
- Map the
IdandNamefields - Execute the update
Alternative Method (for small numbers of records):
1. Navigate to the Product Configuration record directly
2. Click Edit
3. In the Name field, position your cursor at the end and delete any trailing spaces
4. Click Save
Step 3: Verify the Fix
- Navigate to the Solution Console
- Open the basket or solution containing the affected product configuration
- Verify the product name now displays correctly in the tree view
- Check other views (list views, reports) to confirm consistent display
Step 4: Prevent Future Occurrences
If product names are imported from external systems:
- Navigate to Setup > Object Manager > Product Configuration
- Click Fields & Relationships
- Locate the
Namefield - If using a custom import process, add a data transformation step to trim whitespace:
- In Data Loader: Use Excel formula
=TRIM(A2)before import - In integration middleware: Add a
trim()function to the mapping
If product names are manually entered:
- Consider creating a workflow rule or Process Builder flow to automatically trim the
Namefield on save - Alternatively, create a validation rule to prevent trailing spaces:
Name != TRIM(Name)
Error Message: "Product Configuration Name cannot contain leading or trailing spaces"
Prevention
For Salesforce Administrators
- Data Quality Rules: Implement validation rules or automation to trim whitespace from key text fields on save
- Import Validation: Always use
TRIM()functions when importing data from external systems - Regular Audits: Periodically run SOQL queries to identify records with trailing spaces and clean them proactively
For Integration Teams
- Data Transformation: Add whitespace trimming to all text field mappings in integration middleware
- Testing: Include test cases with trailing spaces to verify data quality rules are working
- Documentation: Document data quality expectations for external systems feeding data into Salesforce
For End Users
- Data Entry Training: Train users to avoid copy-pasting from external sources without reviewing the pasted content
- Validation Feedback: If validation rules are in place, ensure error messages clearly explain the whitespace issue
Related Information
- Affected Objects:
cscfga__Product_Configuration__c - Affected Fields:
Name - Related Components: Solution Console (Angular and React versions)
- Data Quality: Trailing whitespace, leading whitespace, hidden characters
- Tools: Data Loader, Workbench, Developer Console
Priyanka Bhotika
Comments