Overview
The error "Price Item Role and Type combination null - Commercial Product is not valid" occurs when attempting to save records for the cspmb__Price_Item__c object after a package upgrade to R36 or higher. This issue is due to a new field, cspmb__Type__c, requiring a valid combination with the existing Role field. The error typically arises when the Role is set without a compatible Type value. The issue was identified in version R37, and the solution involves ensuring valid combinations of Role and Type fields.
Information
Error Message: "Price Item Role and Type combination null - Commercial Product is not valid"
Cause: The error occurs due to a new field, cspmb__Type__c, introduced in the package upgrade, which requires a valid combination with the existing Price Item Role field. The system enforces a validation rule that prevents saving records with incompatible Role and Type combinations.
Resolution Steps:
-
Review Allowed Combinations:
- Role: Commercial ProductÂ
- Allowed Types: Master, Variant, Offer, Basic
- Role: Package
- Allowed Types: Master, Variant, Offer, Basic
- Role: Add-On
- Allowed Types: Master, Variant, Offer, Basic
- Role: (blank Type)
- Allowed Type: Group
- Role: Commercial ProductÂ
-
Update Records:
For each cspmb__Price_Item__c record with the Role set to "Commercial Product," select an appropriate Type value that satisfies the validation rule.
-
Bulk Updates:
If performing bulk updates or inserts, ensure your data import includes a valid cspmb__Type__c value for each record.
-
Automation Adjustments:
Update any automation (flows, processes, or Apex triggers) that create or update cspmb__Price_Item__c records to populate the cspmb__Type__c field accordingly.
-
Optional Trigger Disabling:
It is possible to disable triggers where this validation is performed by creating an entry in csutil.JsonSettings Custom Settings with the setting name "disablePpdmTriggers" and the value "true." However, this is not recommended as it may affect data integrity.
Important: Always ensure that records comply with the new requirements introduced by the package upgrade to maintain data consistency.
Frequently Asked Questions
- How do I know if this error applies to my situation?
- You'll see the exact error message "Price Item Role and Type combination null - Commercial Product is not valid" when trying to save records for the cspmb__Price_Item__c object after a package upgrade.
- What are the allowed combinations for Role and Type fields?
-
The allowed combinations are:
- Role: Commercial Product, Allowed Types: Master, Variant, Offer, Basic
- Role: Package, Allowed Types: Master, Variant, Offer, Basic
- Role: Add-On, Allowed Types: Master, Variant, Offer, Basic
- Role: (blank Type), Allowed Type: Group
- Can I disable the validation rule?
- It is possible to disable triggers where this validation is performed by creating an entry in csutil.JsonSettings Custom Settings with the setting name "disablePpdmTriggers" and the value "true." However, this is not recommended as it may affect data integrity.
- What should I do if the error persists after ensuring valid combinations?
- If the error persists, ensure that all records are updated with valid Role and Type combinations and that any automation is adjusted to populate the cspmb__Type__c field correctly. If issues continue, contact support for further assistance.
Priyanka Bhotika
Comments