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>: []

Who are these Discworld wizards from this picture?

Most important new papers in computational complexity

Apex Class Deployment: duplicate value found: <unknown> duplicates value on record with id: <unknown>

How can I deal with extreme temperatures in a hotel room?

Is there reliable evidence that depleted uranium from the 1999 NATO bombing is causing cancer in Serbia?

Are gliders susceptible to bird strikes?

If I cast Booming Blade learned via the Magic Initiate feat, and use it on my druid's Flame Blade spell, what spellcasting modifier do I use?

Can I travel from Germany to England alone as an unaccompanied minor?

Who voices the character "Finger" in The Fifth Element?

What does the phrase "building hopping chop" mean here?

Why is Japan trying to have a better relationship with Iran?

Single level file directory

Chords behaving as a melody

For decoupling an IC's power supply pins, is there any reason to use multiple capacitances when all the MLCCs have the same package size?

How to get a character's limb regrown at 3rd level?

My colleague is constantly blaming me for his errors

What could a reptilian race tell by candling their eggs?

Skipping over failed imports until they are needed (if ever)

Different budgets within roommate group

Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?

Golf the smallest circle!

Security Patch SUPEE-11155 - Possible issues?

Adjective for 'made of pus' or 'corrupted by pus' or something of something of pus

Meaning of じゃないんじゃない?



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;








4















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.










share|improve this question









New contributor



A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    4















    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.










    share|improve this question









    New contributor



    A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      4












      4








      4








      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.










      share|improve this question









      New contributor



      A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      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






      share|improve this question









      New contributor



      A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited 9 hours ago







      A stacked cube













      New contributor



      A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 9 hours ago









      A stacked cubeA stacked cube

      615 bronze badges




      615 bronze badges




      New contributor



      A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          4














          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.






          share|improve this answer








          New contributor



          A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





















            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.









            draft saved

            draft discarded


















            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









            4














            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.






            share|improve this answer








            New contributor



            A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.























              4














              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.






              share|improve this answer








              New contributor



              A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                4












                4








                4







                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.






                share|improve this answer








                New contributor



                A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                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.







                share|improve this answer








                New contributor



                A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                share|improve this answer



                share|improve this answer






                New contributor



                A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                answered 9 hours ago









                A stacked cubeA stacked cube

                615 bronze badges




                615 bronze badges




                New contributor



                A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.




                New contributor




                A stacked cube is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                    A stacked cube is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

                    Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

                    19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу