You need to sign in to do that
Don't have an account?

Error System.QueryException Duplicate fields selected
I received 100+ error emails overnight that all look a bit like what I've copied/pasted below. I'm not a developer and am trying to figure out how to fix this. Luckily it's in our Partial Sandbox, so is not affecting our Production org but still, would like to get to the bottom of it. From what I've read, a duplicate field error like this means there are fields with identical API names and the query errors out essentially not knowing which one to use/reference. I do see fields with the label "Amount" with identical APIs but nothing that has changed or been added in the last couple days, which makes me think why would this error suddenly come up now. Where do I find the query? How do I identify which Amount field it's looking for? And where/how do I update the query to fix this?
Error Type: System.QueryException
Error Date: 2019-12-13 04:15:20
Message: "npsp__Largest_Soft_Credit_Date__c,npo02__LastOppAmount__c,npo02__LastCloseDate__c,npo02__LastMembershipAmount__c
^
ERROR at Row:1:Column:350
duplicate field selected: Amount
Rollups State:"
Context: CRLP.ContactSoftCredit
Stack Trace:
No stacktrace available at the time of saving the record. (npsp)
Error Type: System.QueryException
Error Date: 2019-12-13 04:15:20
Message: "npsp__Largest_Soft_Credit_Date__c,npo02__LastOppAmount__c,npo02__LastCloseDate__c,npo02__LastMembershipAmount__c
^
ERROR at Row:1:Column:350
duplicate field selected: Amount
Rollups State:"
Context: CRLP.ContactSoftCredit
Stack Trace:
No stacktrace available at the time of saving the record. (npsp)
You got this error bcs : two fields have the same API name
Example :
Account obj = [Select Id, Name, Name from Account];
Here Name field is used twice then also we are getting two fields have the same API name Error.
Check your select query and let me know your review.
Mark it as best answer if you resolved it.
Thanks,
Foram Rana
there is twice the Amount field in your select query.
Were you able to resolve this issue?
I am also getting similar issue as below-
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.
Thanks!
I never got an answer or resolution but the issue hasn't come up again since December 2019.
Oh okay.. great it is.
But in our case we are getting error a lot in sandbox environment.
Thanks!
Can this be my first Best Answer?