Apex Class Deployment: duplicate value found: duplicates value on record with id: Object Deploy fails with:...
What game is this character in the Pixels movie from?
Does a return economy-class seat between London and San Francisco release 5.28 t of CO2e?
How do I tell the reader that my character is autistic in Fantasy?
Golf the smallest circle!
Are gliders susceptible to bird strikes?
Could a Weapon of Mass Destruction, targeting only humans, be developed?
Sharing referee/AE report online to point out a grievous error in refereeing
What is the purpose of putting a capacitor on the primary side of a step-down transformer?
Is it bad to describe a character long after their introduction?
Security Patch SUPEE-11155 - Possible issues?
How to describe POV characters?
What's the easiest way for a whole party to be able to communicate with a creature that doesn't know Common?
Is there reliable evidence that depleted uranium from the 1999 NATO bombing is causing cancer in Serbia?
Is there a canon reason why Klingon and Romulan vessels are so similar in shape?
Balanced parentheses using STL C++
Find first and last non-zero column in each row of a pandas dataframe
How to answer "write something on the board"?
Why won't the ground take my seed?
Buliding a larger matrix from a smaller one
How exactly is a normal force exerted, at the molecular level?
Can a nowhere continuous function have a connected graph?
Ordered list of OR journals
Can you actually break an FPGA by programming it wrong?
Apex REST API - Unable to set StatusCode to 429
Apex Class Deployment: duplicate value found: duplicates value on record with id:
Object Deploy fails with: “duplicate value found: <unknown> duplicates value on record with id”Test Class Deployment Failure duplicate value found <unknown> duplicates<unknown> duplicates value on record with id: <unknown>How to debug the mysterious “duplicate value found: <unknown> duplicates value on record with id: <unknown>” errorDeployment getting failed with Error: duplicate value found: <unknown> duplicates value on record with id: <unknown>Test Class Failure : DUPLICATE_VALUE, duplicate value found: Unique_Record_ID__c duplicates value on record with id:objects/Opportunity.object (Opportunity.Reason_for_Loss__c) — Error: duplicate value found: <unknown> duplicates value on record with id: <unknown>objects/TxConfiguration__c.object (TxConfiguration__c.W_Page__c) — Error: duplicate value found: <unknown> duplicates value on record with id:How to build a testdatafactory without error : DUPLICATE_VALUE, duplicate value found: duplicates value on record with id: : []Need help with this strange error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
As many others have already done, I am providing yet another cautionary tale of the elusive, misleading, and downright frustrating, magical error:
duplicate value found: <unknown> duplicates value on record with id: <unknown>
The situation:
- Attempting to deploy an Apex Class from my local IDE
- Deployment fails, no error messages back whatsoever
- Created the empty Apex Class directly in the Salesforce Developer Console
- Pasted in content from local IDE
- Attempted to save, gets back the magical error message in the Problems list
- Searched online, everyone is saying one of the following:
- It's version history on fields, turn it off, apparently this one is solved as of Winter '19 release
- An update DML statement is violating some kind of uniqueness constraints.
- Commented out class body, no effect
- So the issue isn't update DML statements either.
- Commented out superclass extend, no effect
I have posted the resolution I found below as an answer.
apex deployment class duplicate-value
New contributor
add a comment |
As many others have already done, I am providing yet another cautionary tale of the elusive, misleading, and downright frustrating, magical error:
duplicate value found: <unknown> duplicates value on record with id: <unknown>
The situation:
- Attempting to deploy an Apex Class from my local IDE
- Deployment fails, no error messages back whatsoever
- Created the empty Apex Class directly in the Salesforce Developer Console
- Pasted in content from local IDE
- Attempted to save, gets back the magical error message in the Problems list
- Searched online, everyone is saying one of the following:
- It's version history on fields, turn it off, apparently this one is solved as of Winter '19 release
- An update DML statement is violating some kind of uniqueness constraints.
- Commented out class body, no effect
- So the issue isn't update DML statements either.
- Commented out superclass extend, no effect
I have posted the resolution I found below as an answer.
apex deployment class duplicate-value
New contributor
add a comment |
As many others have already done, I am providing yet another cautionary tale of the elusive, misleading, and downright frustrating, magical error:
duplicate value found: <unknown> duplicates value on record with id: <unknown>
The situation:
- Attempting to deploy an Apex Class from my local IDE
- Deployment fails, no error messages back whatsoever
- Created the empty Apex Class directly in the Salesforce Developer Console
- Pasted in content from local IDE
- Attempted to save, gets back the magical error message in the Problems list
- Searched online, everyone is saying one of the following:
- It's version history on fields, turn it off, apparently this one is solved as of Winter '19 release
- An update DML statement is violating some kind of uniqueness constraints.
- Commented out class body, no effect
- So the issue isn't update DML statements either.
- Commented out superclass extend, no effect
I have posted the resolution I found below as an answer.
apex deployment class duplicate-value
New contributor
As many others have already done, I am providing yet another cautionary tale of the elusive, misleading, and downright frustrating, magical error:
duplicate value found: <unknown> duplicates value on record with id: <unknown>
The situation:
- Attempting to deploy an Apex Class from my local IDE
- Deployment fails, no error messages back whatsoever
- Created the empty Apex Class directly in the Salesforce Developer Console
- Pasted in content from local IDE
- Attempted to save, gets back the magical error message in the Problems list
- Searched online, everyone is saying one of the following:
- It's version history on fields, turn it off, apparently this one is solved as of Winter '19 release
- An update DML statement is violating some kind of uniqueness constraints.
- Commented out class body, no effect
- So the issue isn't update DML statements either.
- Commented out superclass extend, no effect
I have posted the resolution I found below as an answer.
apex deployment class duplicate-value
apex deployment class duplicate-value
New contributor
New contributor
edited 8 hours ago
A stacked cube
New contributor
asked 8 hours ago
A stacked cubeA stacked cube
615 bronze badges
615 bronze badges
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The Resolution!
It was a PEBKAC error. But since this is an extremely vague error, I figure I will throw my own experience out. The more instances of this that get thrown out, I figure everyone will have a better grasp of how wide a range, and also how simple an issue can be and still set off this completely erroneous message.
That's the main focus here, is that even if my particular situation doesn't apply, look for other things that are as stupidly simple as this.
In my case, this class I was trying to deploy was borrowed from another. Created the new Apex Class, copy-pasted contents from another, gutted specific parts from the original and replaced them with specific parts for the new.
You can probably already guess where this is going.
I forgot to change the name of the class at the top of the file.
So, the class, the file being named OpportunityHandler.cls, had the declaration inside of AccountHandler. Problem is two fold: Not only does the file name not match the class declaration it holds inside, but this is now a second file trying to declare the class of AccountHandler.
The fix? Change the class declaration to match the file name.
After this it's pretty clear why it was a warning about duplicates. It was a duplicate class declaration! It still doesn't help that the error is so vague for such a simple, avoidable, PEBKAC-induced issue like this. But more than anything I just want to throw another example out of what this duplicate warning can mean.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "459"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
A stacked cube is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f267249%2fapex-class-deployment-duplicate-value-found-unknown-duplicates-value-on-reco%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The Resolution!
It was a PEBKAC error. But since this is an extremely vague error, I figure I will throw my own experience out. The more instances of this that get thrown out, I figure everyone will have a better grasp of how wide a range, and also how simple an issue can be and still set off this completely erroneous message.
That's the main focus here, is that even if my particular situation doesn't apply, look for other things that are as stupidly simple as this.
In my case, this class I was trying to deploy was borrowed from another. Created the new Apex Class, copy-pasted contents from another, gutted specific parts from the original and replaced them with specific parts for the new.
You can probably already guess where this is going.
I forgot to change the name of the class at the top of the file.
So, the class, the file being named OpportunityHandler.cls, had the declaration inside of AccountHandler. Problem is two fold: Not only does the file name not match the class declaration it holds inside, but this is now a second file trying to declare the class of AccountHandler.
The fix? Change the class declaration to match the file name.
After this it's pretty clear why it was a warning about duplicates. It was a duplicate class declaration! It still doesn't help that the error is so vague for such a simple, avoidable, PEBKAC-induced issue like this. But more than anything I just want to throw another example out of what this duplicate warning can mean.
New contributor
add a comment |
The Resolution!
It was a PEBKAC error. But since this is an extremely vague error, I figure I will throw my own experience out. The more instances of this that get thrown out, I figure everyone will have a better grasp of how wide a range, and also how simple an issue can be and still set off this completely erroneous message.
That's the main focus here, is that even if my particular situation doesn't apply, look for other things that are as stupidly simple as this.
In my case, this class I was trying to deploy was borrowed from another. Created the new Apex Class, copy-pasted contents from another, gutted specific parts from the original and replaced them with specific parts for the new.
You can probably already guess where this is going.
I forgot to change the name of the class at the top of the file.
So, the class, the file being named OpportunityHandler.cls, had the declaration inside of AccountHandler. Problem is two fold: Not only does the file name not match the class declaration it holds inside, but this is now a second file trying to declare the class of AccountHandler.
The fix? Change the class declaration to match the file name.
After this it's pretty clear why it was a warning about duplicates. It was a duplicate class declaration! It still doesn't help that the error is so vague for such a simple, avoidable, PEBKAC-induced issue like this. But more than anything I just want to throw another example out of what this duplicate warning can mean.
New contributor
add a comment |
The Resolution!
It was a PEBKAC error. But since this is an extremely vague error, I figure I will throw my own experience out. The more instances of this that get thrown out, I figure everyone will have a better grasp of how wide a range, and also how simple an issue can be and still set off this completely erroneous message.
That's the main focus here, is that even if my particular situation doesn't apply, look for other things that are as stupidly simple as this.
In my case, this class I was trying to deploy was borrowed from another. Created the new Apex Class, copy-pasted contents from another, gutted specific parts from the original and replaced them with specific parts for the new.
You can probably already guess where this is going.
I forgot to change the name of the class at the top of the file.
So, the class, the file being named OpportunityHandler.cls, had the declaration inside of AccountHandler. Problem is two fold: Not only does the file name not match the class declaration it holds inside, but this is now a second file trying to declare the class of AccountHandler.
The fix? Change the class declaration to match the file name.
After this it's pretty clear why it was a warning about duplicates. It was a duplicate class declaration! It still doesn't help that the error is so vague for such a simple, avoidable, PEBKAC-induced issue like this. But more than anything I just want to throw another example out of what this duplicate warning can mean.
New contributor
The Resolution!
It was a PEBKAC error. But since this is an extremely vague error, I figure I will throw my own experience out. The more instances of this that get thrown out, I figure everyone will have a better grasp of how wide a range, and also how simple an issue can be and still set off this completely erroneous message.
That's the main focus here, is that even if my particular situation doesn't apply, look for other things that are as stupidly simple as this.
In my case, this class I was trying to deploy was borrowed from another. Created the new Apex Class, copy-pasted contents from another, gutted specific parts from the original and replaced them with specific parts for the new.
You can probably already guess where this is going.
I forgot to change the name of the class at the top of the file.
So, the class, the file being named OpportunityHandler.cls, had the declaration inside of AccountHandler. Problem is two fold: Not only does the file name not match the class declaration it holds inside, but this is now a second file trying to declare the class of AccountHandler.
The fix? Change the class declaration to match the file name.
After this it's pretty clear why it was a warning about duplicates. It was a duplicate class declaration! It still doesn't help that the error is so vague for such a simple, avoidable, PEBKAC-induced issue like this. But more than anything I just want to throw another example out of what this duplicate warning can mean.
New contributor
New contributor
answered 8 hours ago
A stacked cubeA stacked cube
615 bronze badges
615 bronze badges
New contributor
New contributor
add a comment |
add a comment |
A stacked cube is a new contributor. Be nice, and check out our Code of Conduct.
A stacked cube is a new contributor. Be nice, and check out our Code of Conduct.
A stacked cube is a new contributor. Be nice, and check out our Code of Conduct.
A stacked cube is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f267249%2fapex-class-deployment-duplicate-value-found-unknown-duplicates-value-on-reco%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown