Start a conversation

Product Configuration Name with Trailing Space Causing Display Issues

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

  1. Navigate to Setup > Developer Console
  2. Click Query Editor
  3. 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 '% '

  4. Review the results to identify affected records

  5. Note the configuration IDs for the next step

Step 2: Remove Trailing Spaces from Configuration Names

  1. Navigate to Setup > Data Loader (or use Workbench)
  2. Select Export to download the affected records
  3. In the exported CSV file:
  4. Open in a text editor or Excel
  5. For each Name value, remove any trailing spaces
  6. Use Find & Replace if needed: Find " " (space at end), Replace with ""

  7. Save the updated CSV file

  8. Use Data Loader > Update to upload the corrected records
  9. Map the Id and Name fields
  10. 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

  1. Navigate to the Solution Console
  2. Open the basket or solution containing the affected product configuration
  3. Verify the product name now displays correctly in the tree view
  4. Check other views (list views, reports) to confirm consistent display

Step 4: Prevent Future Occurrences

If product names are imported from external systems:

  1. Navigate to Setup > Object Manager > Product Configuration
  2. Click Fields & Relationships
  3. Locate the Name field
  4. If using a custom import process, add a data transformation step to trim whitespace:
  5. In Data Loader: Use Excel formula =TRIM(A2) before import
  6. In integration middleware: Add a trim() function to the mapping

If product names are manually entered:

  1. Consider creating a workflow rule or Process Builder flow to automatically trim the Name field on save
  2. 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
  • 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
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments