{"id":6396,"date":"2018-02-28T01:45:11","date_gmt":"2018-02-28T01:45:11","guid":{"rendered":"https:\/\/www.jitendrazaa.com\/blog\/?p=6396"},"modified":"2018-02-28T01:45:11","modified_gmt":"2018-02-28T01:45:11","slug":"creating-lookup-field-in-external-object","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/creating-lookup-field-in-external-object\/","title":{"rendered":"Creating Lookup field in External Object"},"content":{"rendered":"<p style=\"text-align: justify;\">This is going to be very short note for readers and pretty much possible that you already know about problem and its solution. However, lets discuss problem first.<\/p>\n<p style=\"text-align: justify;\">On External Object, we do get an option to create a lookup field. It looks very straight forward first, that create a lookup field and populate value in it. Below image shows, what happens when you try to populate newly created lookup field on External Object.<\/p>\n<figure id=\"attachment_6397\" aria-describedby=\"caption-attachment-6397\" style=\"width: 704px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6397\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/02\/Lookup-Field-in-External-Object.gif?resize=704%2C408&#038;ssl=1\" alt=\"Lookup Field in External Object - Not Working\" width=\"704\" height=\"408\" \/><figcaption id=\"caption-attachment-6397\" class=\"wp-caption-text\">Lookup Field in External Object &#8211; Not Working<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">Did you observed, that\u00a0<strong>Lookup field on External Object does not retain any value in Salesforce?<\/strong>\u00a0Salesforce should have given some proper error message either while creating this field or after updating record.<\/p>\n<p style=\"text-align: justify;\">\u00a0<strong>What is External Object in Salesforce ?\u00a0<\/strong>This is kind of virtual object which does not exists in your Org. So, you created a field on Object which does not exists and then tried to populate it, what else you could have imagined ?<\/p>\n<p style=\"text-align: justify;\"><strong>Resolution of this situation is very easy\u00a0<\/strong>and would make lot of sense. Same solution applies to\u00a0<strong>External Lookup field\u00a0<\/strong>as well in Salesforce. All you have to do is, create a new field in Source system of type text first (length 18) and Sync your <strong>External Data Source<\/strong> so that new field will appear in your \/ destination Org. Now edit field&#8217;s data type to lookup or External lookup and it will work as expected.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to create a lookup field in Salesforce External Object <\/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":[9],"tags":[431,432],"class_list":["post-6396","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-external-object","tag-salesforce-connect"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4942,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-winter-16-top-features\/","url_meta":{"origin":6396,"position":0},"title":"Salesforce Winter 16 &#8211; Top features","author":"Jitendra","date":"October 28, 2015","format":false,"excerpt":"You can watch recording of my live stream channel as well to know more on Winter 16 features.\u00a0Powerpoint presentation used in livestream can be accessed from here. 1. Object Manager Objects are objects, even if they are standard or custom objects. Salesforce simplified navigation to access Objects, we can access\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Setup Audit Trail - Salesforce Winter 16","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/10\/Setup-Audit-Trail.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/10\/Setup-Audit-Trail.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/10\/Setup-Audit-Trail.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/10\/Setup-Audit-Trail.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4628,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/become-expert-in-formulas-salesforce-video-newsletter-july-2015\/","url_meta":{"origin":6396,"position":1},"title":"Become expert in formulas  &#8211; Salesforce Video Newsletter &#8211; July 2015","author":"Jitendra","date":"July 7, 2015","format":false,"excerpt":"Salesforce video newletter of July 2015 for Formula","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6538,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/send-salesforce-survey-without-writing-code\/","url_meta":{"origin":6396,"position":2},"title":"Send Salesforce Survey Without Code","author":"Jitendra","date":"October 21, 2018","format":false,"excerpt":"Use Flow & Process builder to send customer satisfaction survey on case close","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Send Salesforce Survey using Flow and Process Builder","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/10\/Send-Salesforce-Survey-using-Flow-and-Process-Builder.png?fit=1120%2C540&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/10\/Send-Salesforce-Survey-using-Flow-and-Process-Builder.png?fit=1120%2C540&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/10\/Send-Salesforce-Survey-using-Flow-and-Process-Builder.png?fit=1120%2C540&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/10\/Send-Salesforce-Survey-using-Flow-and-Process-Builder.png?fit=1120%2C540&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/10\/Send-Salesforce-Survey-using-Flow-and-Process-Builder.png?fit=1120%2C540&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4174,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-interview-questions-part-22\/","url_meta":{"origin":6396,"position":3},"title":"Salesforce Interview Questions &#8211; Part 22","author":"Jitendra","date":"December 1, 2015","format":false,"excerpt":"Consider it Facts or FAQ or interview questions but its small and important notes about Salesforce. More than 200 interview questions for Salesforce developer, Admin and consultants","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"220+ Salesforce Interview Questions","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/220plus-Interview-Questions-1024x303.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/220plus-Interview-Questions-1024x303.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/220plus-Interview-Questions-1024x303.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3218,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-interview-question-part-15\/","url_meta":{"origin":6396,"position":4},"title":"Salesforce Interview Question \u2013 Part 15","author":"Jitendra","date":"May 24, 2013","format":false,"excerpt":"141 : User Wants to set the starting day in Calendar as \"Monday\" instead of \"Sunday\". How to get it done? Ans : Change the user locale to \"English ( United Kingdom ) \" in Personal information or User record. 142 : Why CSS is not working in PDF created\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4447,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/all-about-upsert-and-external-id-in-dataloader-and-apex-videos\/","url_meta":{"origin":6396,"position":5},"title":"All about Upsert and External ID in Dataloader and Apex &#8211; Videos","author":"Jitendra","date":"May 11, 2015","format":false,"excerpt":"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's why its here :) . External\u2026","rel":"","context":"In &quot;Apex&quot;","block_context":{"text":"Apex","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/apex\/"},"img":{"alt_text":"Field Mapping to create Parent Child relationship using ExternalId in Salesforce","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=350%2C200&ssl=1","width":350,"height":200,"srcset":"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=350%2C200&ssl=1 1x, 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=525%2C300&ssl=1 1.5x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/6396","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=6396"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/6396\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=6396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=6396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=6396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}