Overview
In CloudSense (example version: R36), finishing a Product Configuration and then saving (including Save without validation) can fail with the Salesforce/Apex runtime error “Attempt to de-reference a null object”. Debug logs often show this as common.apex.runtime.impl.ExecutionException and reference cscfga.UISupport.storeConfigs.
A common cause is that the Product Configuration contains an attribute that still references a deleted CloudSense Attribute Definition record (cscfga__Attribute_Definition__c where IsDeleted = true). Restoring (undeleting) the deleted Attribute Definition typically resolves the null-reference condition and allows the save/upgrade flow to complete.
Solution
Error / Symptom
- UI error:
"Attempt to de-reference a null object" - Observed location:
cscfga.UISupport.storeConfigs - Typical trigger: Click Finish in product configuration, then click Save without validation (or an equivalent save action).
Root Cause
A Product Configuration (PC) contains an attribute (example: “IsPartnerAccount”) whose referenced Attribute Definition record has been deleted in Salesforce:
- Object:
cscfga__Attribute_Definition__c - Condition:
IsDeleted = true
When CloudSense attempts to store/upgrade configuration data, the code path expects the Attribute Definition to exist. If the referenced definition is deleted, that reference can resolve to null, causing the save flow to fail with “Attempt to de-reference a null object” from cscfga.UISupport.storeConfigs.
How to Diagnose
- Identify the affected Product Configuration (PC) record where the error occurs (example:
<product_configuration_id>). - Identify the attribute involved (example attribute name: “IsPartnerAccount”) and the referenced Attribute Definition record id (example:
<attribute_definition_id>). - Confirm whether the Attribute Definition was deleted by querying it including deleted rows. Example SOQL:
SELECT Id, IsDeleted
FROM cscfga__Attribute_Definition__c
WHERE Id = '<attribute_definition_id>'
ALL ROWS
If IsDeleted = true, the Product Configuration is referencing a deleted definition.
Resolution (Restore the Deleted Attribute Definition)
-
Undelete the deleted
cscfga__Attribute_Definition__crecord (the Attribute Definition referenced by the PC attribute).- This can be done using standard Salesforce undelete mechanisms (for example, restoring the record from the Recycle Bin, or performing an undelete operation via admin tools/API—depending on your org controls).
- Re-run the original action:
- Open the basket / configuration
- Click Finish
- Click Save without validation (or the same save action you used previously)
Verification
- The configuration save completes without showing “Attempt to de-reference a null object”.
- If the issue appeared broadly, re-test multiple products/configurations to confirm no other attributes reference deleted Attribute Definitions.
Frequently Asked Questions
- 1. How do I know this is the same issue?
- You see the error “Attempt to de-reference a null object” during Finish/Save in product configuration, and logs indicate
cscfga.UISupport.storeConfigs. Investigation shows at least one referencedcscfga__Attribute_Definition__crecord is deleted (IsDeleted = true). - 2. What should I query to confirm an Attribute Definition is deleted?
-
Query the Attribute Definition with deleted rows included:
IfSELECT Id, IsDeleted FROM cscfga__Attribute_Definition__c WHERE Id = '<attribute_definition_id>' ALL ROWSIsDeleted = true, restore/undelete it. - 3. Why does a deleted Attribute Definition cause a null object error?
- The Product Configuration still holds an attribute that references that definition. When CloudSense stores configuration data (
cscfga.UISupport.storeConfigs), it expects the referenced definition to exist; a deleted definition can result in a null reference and trigger “Attempt to de-reference a null object”. - 4. What if undeleting the Attribute Definition is not possible?
- If the definition cannot be restored (for example, it was hard-deleted), identify the PC attribute that references it and re-establish a valid Attribute Definition reference (for example, recreate the definition and update the configuration to point to it) before retrying the Finish/Save flow.
Matej Storga
Comments