function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shraddha D GuptaShraddha D Gupta 

Error System.QueryException : Duplicate fields selected

Hi All, 

I am getting the error as below while contracting the Opportunity -

SBQQ.OpportunityAfter: execution of AfterUpdate caused by: System.QueryException : duplicate field selected: SBQQ__Status__c(SBQQ) No record updated

and not sure how to resolve this. 

Any help would be much appreaciated. 

ShirishaShirisha (Salesforce Developers) 
Hi Shraddha,


This error occurs if you have used the same field name twice in the SOQL query.

Ex:Select Id, Name, Name from Account

I would suggest you to enable the debug logs and check for the class which is being invoked and update the SOQL query if it is custom one.

However,if you feel like this is coming from the Managed package SBQQ then you can reach out to the salesforce support to debug the issue further by enabling the logs on Managed package namespace.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Dushyant SonwarDushyant Sonwar
If you can post the screenshot , then it will easier for others to help you out
Shraddha D GuptaShraddha D Gupta
Hi Dushyant,

I am getting this email from APEX Application- 

The following error occurred during contract creation. Please provide the following information to your Salesforce CPQ Admin:
Orders affected: 00000898
Error type: System.QueryException
Reason for error: duplicate field selected: SBQQ__Status__c