{"id":4447,"date":"2015-05-11T01:17:39","date_gmt":"2015-05-11T01:17:39","guid":{"rendered":"http:\/\/www.jitendrazaa.com\/blog\/?p=4447"},"modified":"2015-11-18T22:59:06","modified_gmt":"2015-11-18T22:59:06","slug":"all-about-upsert-and-external-id-in-dataloader-and-apex-videos","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/all-about-upsert-and-external-id-in-dataloader-and-apex-videos\/","title":{"rendered":"All about Upsert and External ID in Dataloader and Apex &#8211; Videos"},"content":{"rendered":"<p style=\"text-align: justify;\">You may be wondering that there are tons of articles available for upsert operation and what is need of one more blog post. I wanted to note everything important about upsert operations using datalaoder and Apex with identified gotchas at single place, and that&#8217;s why its here \ud83d\ude42 .<\/p>\n<p style=\"text-align: justify;\">External ID is field in Salesforce to say that this field is primary key in external Database which can be used to identify that external record exists in Salesforce or not ? There are many benefits of external key like :<\/p>\n<ul>\n<li style=\"text-align: justify;\">It can be used to identify if record exists or not and record automatically inserted or updated using upsert operation<\/li>\n<li style=\"text-align: justify;\">Upsert operation is supported by Dataloader, Apex and API<\/li>\n<li style=\"text-align: justify;\">Any field marked as external id is indexed and can be used in SOQL or report filter<\/li>\n<li style=\"text-align: justify;\">You can create Parent child record in\u00a0single statement in Apex<\/li>\n<\/ul>\n<p><strong>Using Upsert operation to create\/update child record and relate to existing parent record with help of\u00a0External Id<\/strong><\/p>\n<p style=\"text-align: justify;\">Lets assume that you have list of contacts and Account in external SQL Server database and you want to import those Account and\u00a0contact weekly. It is possible that you have already imported contacts previously\u00a0so don&#8217;t want to duplicate records\u00a0if already created in Salesforce. To solve this problem we can use external Id on Contact and use upsert operation on dataloader. Let&#8217;s assume external Id field on Contact is &#8220;SQL_Server__Id__c&#8221; (I am assuming that Account records in Salesforce also have external Id and records are already imported. Same below\u00a0steps can be used to import Account record as well).<!--more--><\/p>\n<ul>\n<li style=\"text-align: justify;\">Launch Dataloader installed from Salesforce and make sure settings\u00a0like &#8220;Batch Size&#8221;, &#8220;Server host&#8221;, &#8220;Start at row&#8221; are correct.<\/li>\n<\/ul>\n<figure id=\"attachment_4449\" aria-describedby=\"caption-attachment-4449\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Dataloader-Settings.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4449\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Dataloader-Settings.png?resize=550%2C317&#038;ssl=1\" alt=\"Salesforce Dataloader Settings\" width=\"550\" height=\"317\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Dataloader-Settings.png?w=808&amp;ssl=1 808w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Dataloader-Settings.png?resize=300%2C173&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Dataloader-Settings.png?resize=624%2C359&amp;ssl=1 624w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-4449\" class=\"wp-caption-text\">Salesforce Dataloader Settings<\/figcaption><\/figure>\n<ul>\n<li style=\"text-align: justify;\">click on &#8220;Upsert&#8221; button.<\/li>\n<li style=\"text-align: justify;\">Login Window may appear, so enter your Username and Password+Security token.<\/li>\n<li style=\"text-align: justify;\">Select &#8220;Contact&#8221; object in next window and choose CSV file of contact you want to import in Salesforce.<\/li>\n<li style=\"text-align: justify;\">It will alert informing total number of records going to be processed, click OK.<\/li>\n<li style=\"text-align: justify;\">In next screen , you will be prompted to select field from Contact which should be used by Salesforce to identify\u00a0record and take decision that it needs to be updated or inserted. Id field and all fields which are marked as external Id will be listed here.\u00a0\u00a0Don&#8217;t expect this screen in any other operations except upsert.<\/li>\n<\/ul>\n<figure id=\"attachment_4450\" aria-describedby=\"caption-attachment-4450\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/External-Id-choice-in-Upsert-operation-of-Dataloader.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4450\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/External-Id-choice-in-Upsert-operation-of-Dataloader.png?resize=580%2C581&#038;ssl=1\" alt=\"External Id choice in Upsert operation of Dataloader\" width=\"580\" height=\"581\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/External-Id-choice-in-Upsert-operation-of-Dataloader.png?w=699&amp;ssl=1 699w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/External-Id-choice-in-Upsert-operation-of-Dataloader.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/External-Id-choice-in-Upsert-operation-of-Dataloader.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/External-Id-choice-in-Upsert-operation-of-Dataloader.png?resize=624%2C625&amp;ssl=1 624w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><figcaption id=\"caption-attachment-4450\" class=\"wp-caption-text\">External Id choice in Upsert operation of Dataloader<\/figcaption><\/figure>\n<ul>\n<li style=\"text-align: justify;\">As shown in above image, select correct external Id field (in this case SQL_Server_Id__c) and click next.<\/li>\n<li style=\"text-align: justify;\">Next screen will show list of all Parent Object and each object will provide choice to select either Id field or external id field of Parent Object. This is one of amazing feature of Salesforce where Parent child relationship can be established with help of external Id (No need to use excel sheet Vlookup functions to extract 15 digit Salesforce Id to establish relationship). In this case example, we only want to create relationship with \u00a0Account so we will use only Account&#8217;s external Id and leave others unselected.<\/li>\n<\/ul>\n<figure id=\"attachment_4451\" aria-describedby=\"caption-attachment-4451\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Create-Parent-child-relationship-using-External-Id-in-Dataloader.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4451\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Create-Parent-child-relationship-using-External-Id-in-Dataloader.png?resize=550%2C290&#038;ssl=1\" alt=\"Create Parent child relationship using External Id in Dataloader\" width=\"550\" height=\"290\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Create-Parent-child-relationship-using-External-Id-in-Dataloader.png?w=701&amp;ssl=1 701w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Create-Parent-child-relationship-using-External-Id-in-Dataloader.png?resize=300%2C158&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Create-Parent-child-relationship-using-External-Id-in-Dataloader.png?resize=624%2C328&amp;ssl=1 624w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-4451\" class=\"wp-caption-text\">Create Parent child relationship using External Id in Dataloader<\/figcaption><\/figure>\n<ul>\n<li style=\"text-align: justify;\">At end of this article, I have provided <a href=\"https:\/\/www.youtube.com\/channel\/UCbhMqw4JGvDMj9sd8z77jug\">Youtube Video link<\/a> following same steps.<\/li>\n<li style=\"text-align: justify;\">In Next window we need to map CSV file field with Salesforce fields. One point to notice in below image, how we are mapping Parent Account&#8217;s External Id with contact record.<\/li>\n<\/ul>\n<figure id=\"attachment_4452\" aria-describedby=\"caption-attachment-4452\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Field-Mapping-to-create-Parent-Child-relationship-using-ExternalId-in-Salesforce-e1431304939365.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4452\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Field-Mapping-to-create-Parent-Child-relationship-using-ExternalId-in-Salesforce-e1431304939365.png?resize=550%2C439&#038;ssl=1\" alt=\"Field Mapping to create Parent Child relationship using ExternalId in Salesforce\" width=\"550\" height=\"439\" \/><\/a><figcaption id=\"caption-attachment-4452\" class=\"wp-caption-text\">Field Mapping to create Parent Child relationship using ExternalId in Salesforce<\/figcaption><\/figure>\n<ul>\n<li style=\"text-align: justify;\">Once all of above steps are followed, we can click on Next window and upsert operation will start. Salesforce will provide CSV file of success and failure results to perform\u00a0post analysis of operation.<\/li>\n<\/ul>\n<p><strong>How to use upsert operation in Apex<\/strong><\/p>\n<p>We can upsert records in Apex also, as shown in below code snippet<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nList lstContact = new List();\r\nContact con = new Contact (lastName = 'Zaa', SQL_Server_Id__c='3',firstName='Jitendra');\r\nlstContact.add(con);\r\n\/\/.. Other Contact records added in List\r\nupsert lstContact  SQL_Server_Id__c;\r\n<\/pre>\n<p style=\"text-align: justify;\">Above code snippet will perform upsert operation on all Contact with field &#8216;SQL_Server_Id__c&#8217;. If any one record will fail then none of contact record will be upserted. You may want to perform partial operation where if any record fails then it should not rollback other records processing. In this scenario <strong>Database.upsert<\/strong> comes to rescue. Below code snippet shows how we can use Database.upsert and how to iterate through errors.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nList&lt;Contact&gt; lstContact = new List&lt;Contact&gt;();\r\nContact con = new Contact (lastName = 'Zaa', SQL_Server_Id__c='3',firstName='Jitendra');\r\nlstContact.add(con);\r\n\/\/.. Other Contact records added in List\r\nDatabase.UpsertResult&#x5B;] results = Database.upsert( lstSGAccOppInsert, Contact.SQL_Server_Id__c.getDescribe().getSObjectField() ,false ) ;\r\n\r\nfor(Integer i=0;i&lt;results.size();i++){\r\n    if (!results.get(i).isSuccess()){\r\n        Database.Error err = results.get(i).getErrors().get(0);\r\n        System.debug('Error - '+err.getMessage() + '\\nStatus Code : '+err.getStatusCode()+'\\n Fields : '+err.getFields());\r\n    }\r\n}\r\n<\/pre>\n<p><strong>How to insert parent and child record in single statement in Apex using External Id<\/strong><\/p>\n<p style=\"text-align: justify;\">As informed earlier in this post, we can use external Id of Parent record to insert parent and child in Same statement<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n\/\/Create instance of Child record\r\nContact con = new Contact (lastName = 'Zaa', SQL_Server_Id__c='3',firstName='Jitendra');\r\n\r\n\/\/Create instance of Parenr record and only specify External Id, No Other fields\r\nAccount accountReference = new Account( Account_External_Id__c='21');                \r\n\r\n\/\/relate Child record with Parent\r\ncon.Account = accountReference;\r\n\r\nAccount parentAccount = new Account( Name='Cognizant', MyExtID__c='21');  \r\n\r\n\/\/ Create the account and the Contact.\r\nDatabase.SaveResult&#x5B;] results = Database.insert(new SObject&#x5B;] { parentAccount, con });\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><strong>What if there are more than one records in Salesforce with Same external Id ?<\/strong><\/p>\n<p style=\"text-align: justify;\">In this case Dataloader or Apex will throw an error saying &#8220;Duplicate external id specified&#8221;.<\/p>\n<p style=\"text-align: justify;\"><strong>Making external Id as a unique\u00a0<\/strong><\/p>\n<p style=\"text-align: justify;\">While trying to create External Id field, we have option to select whether field should be unique or not. If field already exists and we want to change it as unique external Id then it must be populated with unique values before making it unique.<\/p>\n<p style=\"text-align: justify;\"><strong>Upsert using Command line Dataloader<\/strong><\/p>\n<p style=\"text-align: justify;\">You can read this <a href=\"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/tutorial-of-command-line-dataloader-salesforce\/\">post to know more about how to configure<\/a> command line dataloader. For upsert, in config file &#8220;process-conf.xml&#8221; you need make below entry.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;entry key=&quot;sfdc.externalIdField&quot; value=&quot;Master__r.External_id__c&quot; \/&gt;\r\n<\/pre>\n<p style=\"text-align: justify;\">and in field mapping file below entry<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nId=Id\r\nMaster__r.External_id__c=Master__r\\:External_id__c\r\n<\/pre>\n<p style=\"text-align: justify;\">Above relationship mapping is only applicable for upsert operations.<\/p>\n<p style=\"text-align: justify;\"><strong>Important consideration for Upsert operation where external Id is not unique<\/strong><\/p>\n<p style=\"text-align: justify;\">To use upsert operation where external Id field is not unique, user performing operation must needs to have &#8220;ViewAllData&#8221; or &#8220;ViewAllRecords&#8221; permission else below error will be thrown :<\/p>\n<blockquote><p>System.SecurityException: ViewAllData or ViewAllRecords required to access external id fields which do not have a unique index<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Salesforce Dataloader Settings and Upsert Operation\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/XsdPPQ-WT58?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><iframe loading=\"lazy\" title=\"Create parent child relationship using External Id and Upsert Operation in Salesforce Dataloader\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/88xb62VwQaU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may be wondering that there are tons of articles available for upsert operation and what is need of one more blog post. I wanted to note everything important about upsert operations using datalaoder and Apex with identified gotchas at single place, and that&#8217;s why its here \ud83d\ude42 . External ID is field in Salesforce [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[20,23,24,9],"tags":[337,58,72,308,309],"class_list":["post-4447","post","type-post","status-publish","format-standard","hentry","category-apex","category-configuration","category-force-com","category-salesforce","tag-apex","tag-cli","tag-dataloader","tag-external-id","tag-upsert"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":6739,"url":"https:\/\/www.jitendrazaa.com\/blog\/integration\/process-pipe-delimited-file-in-mulesoft-3\/","url_meta":{"origin":4447,"position":0},"title":"Use pipe delimited file to upsert record in Mulesoft 3","author":"Jitendra","date":"January 24, 2019","format":false,"excerpt":"Use Mulesoft to upsert record in Salesforce using Pipe delimited file","rel":"","context":"In &quot;Integration&quot;","block_context":{"text":"Integration","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/integration\/"},"img":{"alt_text":"Upsert record in Salesforce using Mulesoft","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2019\/01\/Upsert-record-in-Salesforce-using-Mulesoft.png?fit=500%2C215&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2762,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-interview-questions-part-6\/","url_meta":{"origin":4447,"position":1},"title":"Salesforce Interview Questions &#8211; Part 6","author":"Jitendra","date":"March 10, 2012","format":false,"excerpt":"Basic concepts and Interview Questions of salesforce, Visualforce, Apex and SOQL","rel":"","context":"In &quot;Apex&quot;","block_context":{"text":"Apex","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/apex\/"},"img":{"alt_text":"Salesforce - External Id option while creating field","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/03\/Salesforce-External-Id-option-while-creating-field.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/03\/Salesforce-External-Id-option-while-creating-field.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/03\/Salesforce-External-Id-option-while-creating-field.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3411,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/apex-interview-question-salesforce-part-16\/","url_meta":{"origin":4447,"position":2},"title":"Apex Interview Question \u2013 Salesforce &#8211; Part 16","author":"Jitendra","date":"July 28, 2013","format":false,"excerpt":"151. Give Sample Code Snippet of Apex that that will show that how Parent and Child record can be inserted in Single Statement ? Ans : It can be done with help of External Id. [java] Date dt = Date.today().addDays(7); Opportunity newOpportunity = new Opportunity(Name = 'shivasoft', StageName = 'Prospecting',\u2026","rel":"","context":"In &quot;Apex&quot;","block_context":{"text":"Apex","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/apex\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6244,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/a-tale-of-governor-limits-and-solutions-in-salesforce\/","url_meta":{"origin":4447,"position":3},"title":"A Tale of Governor Limits and Solutions in Salesforce","author":"Jitendra","date":"November 21, 2017","format":false,"excerpt":"Thrilling story of Salesforce Technical Architect on a quest to solve application problems and avoid governor limit errors","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"A Tale of Governor Limits and Solutions in Salesforce","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/09\/A-Tale-of-Governor-Limits-and-Solutions-in-Salesforce.jpg?fit=900%2C417&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/09\/A-Tale-of-Governor-Limits-and-Solutions-in-Salesforce.jpg?fit=900%2C417&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/09\/A-Tale-of-Governor-Limits-and-Solutions-in-Salesforce.jpg?fit=900%2C417&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/09\/A-Tale-of-Governor-Limits-and-Solutions-in-Salesforce.jpg?fit=900%2C417&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3122,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/tutorial-of-command-line-dataloader-salesforce\/","url_meta":{"origin":4447,"position":4},"title":"Command line dataloader in Salesforce &#8211; Solve Common errors","author":"Jitendra","date":"September 26, 2012","format":false,"excerpt":"How to use Command line dataloader in Salesforce with troubleshooting steps and answers to common errors","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Commandline Data Loader tools","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/09\/Commandline-Data-Loader-tools.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/09\/Commandline-Data-Loader-tools.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/09\/Commandline-Data-Loader-tools.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3325,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/apex-visualforce-data-loader-and-soql-interview-question-part-17\/","url_meta":{"origin":4447,"position":5},"title":"Apex, Visualforce, Data Loader and SOQL Interview Question \u2013 Part 17","author":"Jitendra","date":"October 10, 2013","format":false,"excerpt":"161 : Sometimes while deleting record it gives error \"Object cannot be Deleted\". What is the reason for this kind of error ? Ans : This is generic error message prompted by Salesforce many times, which is not well informative. To get informative message, we can try to delete same\u2026","rel":"","context":"In &quot;Apex&quot;","block_context":{"text":"Apex","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/apex\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=4447"}],"version-history":[{"count":6,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4447\/revisions"}],"predecessor-version":[{"id":5047,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4447\/revisions\/5047"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=4447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=4447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=4447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}