Upsert by External Id - Different recordTypes












1















I have an External Id on Account object.



Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?



When I make the upsert I get the following errror :




more than one record found for external id field




The filed is checked only for externalId - and not for unique.



I'm making the upsert using DataLoader.










share|improve this question





























    1















    I have an External Id on Account object.



    Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?



    When I make the upsert I get the following errror :




    more than one record found for external id field




    The filed is checked only for externalId - and not for unique.



    I'm making the upsert using DataLoader.










    share|improve this question



























      1












      1








      1








      I have an External Id on Account object.



      Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?



      When I make the upsert I get the following errror :




      more than one record found for external id field




      The filed is checked only for externalId - and not for unique.



      I'm making the upsert using DataLoader.










      share|improve this question
















      I have an External Id on Account object.



      Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?



      When I make the upsert I get the following errror :




      more than one record found for external id field




      The filed is checked only for externalId - and not for unique.



      I'm making the upsert using DataLoader.







      data-loader externalid id






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 19 '18 at 12:18









      m Peixoto

      437213




      437213










      asked Dec 19 '18 at 8:39









      SalvationSalvation

      676




      676






















          1 Answer
          1






          active

          oldest

          votes


















          3















          Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?




          Unfortunately not. The values within that one field need to be unique for upsert to work. It might be a concatenation of both record type and the rest of the unique ID, etc, depending on your situation, but you will need to modify that data offline.






          share|improve this answer
























          • Out of curiosity, Can there be any practical use of External ID if it's not unique?

            – Pranay Jaiswal
            Dec 19 '18 at 11:25











          • That a great Idea to do. Thanks @sfdcfox

            – Salvation
            Dec 19 '18 at 11:28






          • 1





            @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless.

            – sfdcfox
            Dec 19 '18 at 11:28











          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
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f244126%2fupsert-by-external-id-different-recordtypes%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









          3















          Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?




          Unfortunately not. The values within that one field need to be unique for upsert to work. It might be a concatenation of both record type and the rest of the unique ID, etc, depending on your situation, but you will need to modify that data offline.






          share|improve this answer
























          • Out of curiosity, Can there be any practical use of External ID if it's not unique?

            – Pranay Jaiswal
            Dec 19 '18 at 11:25











          • That a great Idea to do. Thanks @sfdcfox

            – Salvation
            Dec 19 '18 at 11:28






          • 1





            @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless.

            – sfdcfox
            Dec 19 '18 at 11:28
















          3















          Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?




          Unfortunately not. The values within that one field need to be unique for upsert to work. It might be a concatenation of both record type and the rest of the unique ID, etc, depending on your situation, but you will need to modify that data offline.






          share|improve this answer
























          • Out of curiosity, Can there be any practical use of External ID if it's not unique?

            – Pranay Jaiswal
            Dec 19 '18 at 11:25











          • That a great Idea to do. Thanks @sfdcfox

            – Salvation
            Dec 19 '18 at 11:28






          • 1





            @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless.

            – sfdcfox
            Dec 19 '18 at 11:28














          3












          3








          3








          Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?




          Unfortunately not. The values within that one field need to be unique for upsert to work. It might be a concatenation of both record type and the rest of the unique ID, etc, depending on your situation, but you will need to modify that data offline.






          share|improve this answer














          Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?




          Unfortunately not. The values within that one field need to be unique for upsert to work. It might be a concatenation of both record type and the rest of the unique ID, etc, depending on your situation, but you will need to modify that data offline.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 19 '18 at 11:21









          sfdcfoxsfdcfox

          249k11192427




          249k11192427













          • Out of curiosity, Can there be any practical use of External ID if it's not unique?

            – Pranay Jaiswal
            Dec 19 '18 at 11:25











          • That a great Idea to do. Thanks @sfdcfox

            – Salvation
            Dec 19 '18 at 11:28






          • 1





            @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless.

            – sfdcfox
            Dec 19 '18 at 11:28



















          • Out of curiosity, Can there be any practical use of External ID if it's not unique?

            – Pranay Jaiswal
            Dec 19 '18 at 11:25











          • That a great Idea to do. Thanks @sfdcfox

            – Salvation
            Dec 19 '18 at 11:28






          • 1





            @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless.

            – sfdcfox
            Dec 19 '18 at 11:28

















          Out of curiosity, Can there be any practical use of External ID if it's not unique?

          – Pranay Jaiswal
          Dec 19 '18 at 11:25





          Out of curiosity, Can there be any practical use of External ID if it's not unique?

          – Pranay Jaiswal
          Dec 19 '18 at 11:25













          That a great Idea to do. Thanks @sfdcfox

          – Salvation
          Dec 19 '18 at 11:28





          That a great Idea to do. Thanks @sfdcfox

          – Salvation
          Dec 19 '18 at 11:28




          1




          1





          @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless.

          – sfdcfox
          Dec 19 '18 at 11:28





          @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless.

          – sfdcfox
          Dec 19 '18 at 11:28


















          draft saved

          draft discarded




















































          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%2f244126%2fupsert-by-external-id-different-recordtypes%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

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?