Fix products that can't be opened in Product Designer due to a RecordTypeId error on Product2 records.
Products that can't be opened in Product Designer.
Issue
Products can't be opened in Vlocity Product Designer due to a RecordTypeId error.
Cause
Check if the default record type for Product2 is set to Master instead of Product, or if any of the existing products have a null RecordTypeId.
Resolution
-
Check if the default RecordType is configured on the Product2 object.
SELECT Id FROM RecordType WHERE SObjectType = 'Product2' AND DeveloperName = 'Product' - Set the default record type to Product in Setup > Profiles > Object Settings > Product2.
-
Run this query to identify products without a RecordTypeId:
SELECT Id, Name,RecordTypeId FROM Product2 WHERE RecordTypeId = null AND IsActive = true - Update existing Products containing a nullRecordTypeId with the appropriate RecordTypeId.
Note Set theoduct for allprofiles that create products.