{"id":91588,"date":"2017-07-31T06:09:59","date_gmt":"2017-07-31T06:09:59","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=91588"},"modified":"2021-07-16T11:18:35","modified_gmt":"2021-07-16T11:18:35","slug":"relationship-query-salesforce","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/","title":{"rendered":"Relationship Query In Salesforce"},"content":{"rendered":"\n<p>In this blog we will learn about how to build relationship query in salesforce. &nbsp;In salesforce, &nbsp;every object and field has a default&nbsp;<strong><em>Label<\/em><\/strong>, a&nbsp;<strong><em>Name<\/em><\/strong>, and an&nbsp;<strong><em>API Name.&nbsp;<\/em><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Lable<\/strong>: Object or filed name which is shown to user.<\/li><li><strong>Name<\/strong>:&nbsp;Developer-\/Admin-defined internal field name in custom objects.<\/li><li><strong>API Name<\/strong>: It is unique name which is used by developers in code to perform various operation. In custom Object, it is derived from &nbsp;name and a suffix while in standard object label and API name are same.<\/li><\/ul>\n\n\n\n<p>We use the API name in query to fetch the desired records. Let&#8217;s see the various suffix used in salesforce for custom objects.<\/p>\n\n\n\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">Suffix<\/h3><\/div><div class=\"margin-bottom-50\">\n<p>1). <strong>__x<\/strong> : For external object (Not in Salesforce multitenant database but still support the SOQL).<\/p>\n\n\n\n<p>2).&nbsp;<strong>__Share<\/strong>: The sharing object.<\/p>\n\n\n\n<p>3). <strong>__Feed:&nbsp;<\/strong>The chatter feed.<\/p>\n\n\n\n<p>4). <strong>__latitude__s\/__longitude__s<\/strong>: Geolocation Latitude\/Longitude coordinate fields.<\/p>\n\n\n\n<p>5). <strong>__r<\/strong> : To represent relationship between object.<\/p>\n\n\n\n<p>6). &nbsp;<strong>__tab :&nbsp;<\/strong>For custon tab<\/p>\n\n\n\n<p>7). <strong>__c<\/strong> : Suffix used for custom object name.<\/p>\n<\/div>\n\n\n\n<p>.<\/p>\n\n\n\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">Relationship query<\/h3><\/div><div class=\"margin-bottom-50\">\n<p>Now let&#8217;s see some SOQL for parent-child relationship.<\/p>\n\n\n\n<p>1). SOQL for two standard object. Let&#8217;s say Account&nbsp;as parent object and Contact as child object .<\/p>\n\n\n\n<p>-&gt; Query to fetch the all Contact which is associated with Account <strong>&#8216;Webkul&#8217;<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:java\">\/\/ When record is fetch from Contact\n\nSELECT Name, Account.Name FROM Contact where Account.Name = 'Webkul'\n\n\/\/ When record is fetch from Account.\n\/\/ Contacts is child relationship name of Contact object.\nSELECT Name, (SELECT Name FROM Contacts) FROM Account where Name = 'Webkul'<\/pre>\n\n\n\n<p><strong># Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-1.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1301\" height=\"678\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-1.jpg\" alt=\"\" class=\"wp-image-91668\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-1.jpg 1301w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-1-250x130.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-1-300x156.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-1-768x400.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-1-1200x625.jpg 1200w\" sizes=\"(max-width: 1301px) 100vw, 1301px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-2.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1301\" height=\"678\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-2.jpg\" alt=\"\" class=\"wp-image-91669\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-2.jpg 1301w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-2-250x130.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-2-300x156.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-2-768x400.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-2-1200x625.jpg 1200w\" sizes=\"(max-width: 1301px) 100vw, 1301px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<p>2). When one is standard object and one is custom object.<\/p>\n\n\n\n<p>-&gt; Let&#8217;s say we have a custom object with name Product_Variant__c and standard object product with name product2 which is parent of variant. Suppose we want to know the name of the variant where product name is shirt.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:java\">\/\/ When record is fetch from product\n\/\/ Product_Variants is child relationship name of Product_Variant__c\n\/\/ __r relationship suffix of custom object\n\nSELECT Name, (SELECT Name FROM Product_Variants__r) FROM Product2 WHERE Name = 'Shirt'\n\n\/\/ When record is fetch from Product_Variant__c\n\/\/ Product__r is relationship name of custom field Product__c\n\nSELECT Name,Product__r.Name FROM Product_Variant__c\n WHERE Product__r.Name = 'Shirt'\n<\/pre>\n\n\n\n<p><strong>#Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-3.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1301\" height=\"678\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-3.jpg\" alt=\"\" class=\"wp-image-91670\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-3.jpg 1301w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-3-250x130.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-3-300x156.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-3-768x400.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-3-1200x625.jpg 1200w\" sizes=\"(max-width: 1301px) 100vw, 1301px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-4.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1301\" height=\"678\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-4.jpg\" alt=\"\" class=\"wp-image-91671\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-4.jpg 1301w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-4-250x130.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-4-300x156.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-4-768x400.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-4-1200x625.jpg 1200w\" sizes=\"(max-width: 1301px) 100vw, 1301px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<p>3). SOQL for two custom objects. Let&#8217;s say we have two custom object &nbsp;Variant with name Variant__c (Parent) &nbsp;and Product Variant with name Product_Variant__c(Child). As shown in above example Product Variant &nbsp;is also the child of product.<\/p>\n\n\n\n<p>-&gt; Query for the name of Variant where product name is Shirt.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:java\">\/\/ When record is fetch from Product Variant.\n\/\/ Variant_c is the name of custom field Variant__c which is lookup of custom object Variant_c\n\nSELECT Name, Variant__r.Name FROM Product_Variant__c WHERE Product__r.Name = 'Shirt'<\/pre>\n\n\n\n<p><strong>#Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-5.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" width=\"1301\" height=\"678\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-5.jpg\" alt=\"\" class=\"wp-image-91672\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-5.jpg 1301w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-5-250x130.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-5-300x156.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-5-768x400.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/Force-com-Developer-Console-5-1200x625.jpg 1200w\" sizes=\"(max-width: 1301px) 100vw, 1301px\" loading=\"lazy\" \/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">Support<\/h3><\/div><div class=\"margin-bottom-50\">\n<p>That\u2019s all for <strong>Relationship Query In Salesforce<\/strong>, still if you have any further query feel free to add a ticket, we will be happy to help you&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this blog we will learn about how to build relationship query in salesforce. &nbsp;In salesforce, &nbsp;every object and field has a default&nbsp;Label, a&nbsp;Name, and an&nbsp;API Name.&nbsp; Lable: Object or filed name which is shown to user. Name:&nbsp;Developer-\/Admin-defined internal field name in custom objects. API Name: It is unique name which is used by developers <a href=\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":145,"featured_media":91606,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1808],"tags":[5209,5208,1938],"class_list":["post-91588","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ajax","tag-foreign-key","tag-relationship-query","tag-soql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Relationship Query In Salesforce - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Relationship Query In Salesforce - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this blog we will learn about how to build relationship query in salesforce. &nbsp;In salesforce, &nbsp;every object and field has a default&nbsp;Label, a&nbsp;Name, and an&nbsp;API Name.&nbsp; Lable: Object or filed name which is shown to user. Name:&nbsp;Developer-\/Admin-defined internal field name in custom objects. API Name: It is unique name which is used by developers [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-31T06:09:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-16T11:18:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Snehil Jaiswal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Snehil Jaiswal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\"},\"author\":{\"name\":\"Snehil Jaiswal\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1\"},\"headline\":\"Relationship Query In Salesforce\",\"datePublished\":\"2017-07-31T06:09:59+00:00\",\"dateModified\":\"2021-07-16T11:18:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\"},\"wordCount\":363,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png\",\"keywords\":[\"Foreign Key\",\"Relationship Query\",\"SOQL\"],\"articleSection\":[\"Ajax\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\",\"url\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\",\"name\":\"Relationship Query In Salesforce - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png\",\"datePublished\":\"2017-07-31T06:09:59+00:00\",\"dateModified\":\"2021-07-16T11:18:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Relationship Query In Salesforce\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1\",\"name\":\"Snehil Jaiswal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Snehil Jaiswal\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/snehil-jaiswal901\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Relationship Query In Salesforce - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/","og_locale":"en_US","og_type":"article","og_title":"Relationship Query In Salesforce - Webkul Blog","og_description":"In this blog we will learn about how to build relationship query in salesforce. &nbsp;In salesforce, &nbsp;every object and field has a default&nbsp;Label, a&nbsp;Name, and an&nbsp;API Name.&nbsp; Lable: Object or filed name which is shown to user. Name:&nbsp;Developer-\/Admin-defined internal field name in custom objects. API Name: It is unique name which is used by developers [...]","og_url":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-07-31T06:09:59+00:00","article_modified_time":"2021-07-16T11:18:35+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png","type":"image\/png"}],"author":"Snehil Jaiswal","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Snehil Jaiswal","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/"},"author":{"name":"Snehil Jaiswal","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1"},"headline":"Relationship Query In Salesforce","datePublished":"2017-07-31T06:09:59+00:00","dateModified":"2021-07-16T11:18:35+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/"},"wordCount":363,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png","keywords":["Foreign Key","Relationship Query","SOQL"],"articleSection":["Ajax"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/","url":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/","name":"Relationship Query In Salesforce - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png","datePublished":"2017-07-31T06:09:59+00:00","dateModified":"2021-07-16T11:18:35+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/relationship-query-salesforce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/07\/download-12-1.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/relationship-query-salesforce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Relationship Query In Salesforce"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/e7e387ae1eb38a5dd56c53c2daf848d1","name":"Snehil Jaiswal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4bca6424a95aaafa9ab0ddc940099d65d20ab159fbcec826869a62578336590d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Snehil Jaiswal"},"url":"https:\/\/webkul.com\/blog\/author\/snehil-jaiswal901\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/91588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/145"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=91588"}],"version-history":[{"count":11,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/91588\/revisions"}],"predecessor-version":[{"id":296448,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/91588\/revisions\/296448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/91606"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=91588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=91588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=91588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}