- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Question:
When i try to create product i got below error
Review all error messages below to correct your data.
Duplicate value on record: xxxxxx(Related field: SKU (Deprecated))
How can I resolve this error?
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Solution:
With this particular case, Customer was trying to create a product on salesforce and getting a duplicate value error on zqu__SKU__c field.
when a user tries to create a product on Salesforce, a query is run in background on Zqu__SequenceGenerator__c to get the Zqu__MaxValue__c and then update the SKU for the new product by Zqu__MaxValue__c +1.
I ran below query and could see the MaxValue was 1999.
SELECT Id, Name, zqu__SeqName__c, zqu__MaxValue__c, zqu__Length__c FROM zqu__SequenceGenerator__c
and the error customer was getting was related to a product which already have SKU value as 2000. Here SequenceGenerator was trying to increase the MaxValue to 2000 and update the SKU for the new product to 2000 but as there is alredy a product with SKU value 2000 was throwing this error.
Here either user might have manually updated SKU value for the product or have editied maxvalue which is the cause of the error.
In order to resolve the error, run below query, update MaxValue to 2000 and click on Save Rows. Thus next product user creates will have SKU value as 2001.
SELECT Id, Name, zqu__SeqName__c, zqu__MaxValue__c, zqu__Length__c FROM zqu__SequenceGenerator__c
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Solution:
With this particular case, Customer was trying to create a product on salesforce and getting a duplicate value error on zqu__SKU__c field.
when a user tries to create a product on Salesforce, a query is run in background on Zqu__SequenceGenerator__c to get the Zqu__MaxValue__c and then update the SKU for the new product by Zqu__MaxValue__c +1.
I ran below query and could see the MaxValue was 1999.
SELECT Id, Name, zqu__SeqName__c, zqu__MaxValue__c, zqu__Length__c FROM zqu__SequenceGenerator__c
and the error customer was getting was related to a product which already have SKU value as 2000. Here SequenceGenerator was trying to increase the MaxValue to 2000 and update the SKU for the new product to 2000 but as there is alredy a product with SKU value 2000 was throwing this error.
Here either user might have manually updated SKU value for the product or have editied maxvalue which is the cause of the error.
In order to resolve the error, run below query, update MaxValue to 2000 and click on Save Rows. Thus next product user creates will have SKU value as 2001.
SELECT Id, Name, zqu__SeqName__c, zqu__MaxValue__c, zqu__Length__c FROM zqu__SequenceGenerator__c
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √