{"id":894,"date":"2022-01-18T16:41:17","date_gmt":"2022-01-18T16:41:17","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=894"},"modified":"2022-08-03T15:29:22","modified_gmt":"2022-08-03T15:29:22","slug":"retrieve-related-entities","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/retrieve-related-entities\/","title":{"rendered":"Retrieve Related Entities"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Retrieves records related to the given one. Can be used to retrieve records related by many-to-one and many-to-many relationship types to the given record. Commonly follows with <a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/for-each-entity\/\">For Each Entity<\/a> to process several records, also can be used to find out the number of related records.<\/p>\n\n\n\n<p><strong>inputs:&nbsp;<\/strong><\/p>\n\n\n\n<p><span style=\"color:#ef6950;\">entity<\/span> &#8211; input with a record which related records are needed<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><span style=\"color:#9ed267;\">link name<\/span> &#8211; select directly in the operator relationship name, which identified the relevant relationship. The list is empty until the entity port is filled with the needed record.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><strong>outputs:&nbsp;<\/strong><\/p>\n\n\n\n<p><span style=\"color:#ef6950;\">entities<\/span> &#8211; contains all related entities to the given one by the provided relationship. Use this output as input in <a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/for-each-entity\/\">For Each Entity<\/a>.<\/p>\n\n\n\n<p><span style=\"color:#b197cb;\">entities number<\/span> &#8211; the number of those related records.<\/p>\n\n\n\n<p><span style=\"color:#ef6950;\">single entity<\/span> &#8211; contains one random record from the related ones. May be used if it is expected for only one record to be retrieved.<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-83-4c9848c21adf48efa2a9717419b47407.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-83-4c9848c21adf48efa2a9717419b47407-1024x244.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p><div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_894' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-894\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-0e86164049af0' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-0e86164049af0'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='894' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-0e86164049af0\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"894\" \n                               id=\"yasr-stats-dashicon-0e86164049af0\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-0e86164049af0\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-0e86164049af0\">0<\/span>  Average: <span id=\"yasr-vv-average-container-0e86164049af0\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-0e86164049af0' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-0e86164049af0' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Retrieves records related to the given one. Can be used to retrieve records related by many-to-one and many-to-many relationship types to the given record. Commonly follows with For Each Entity to process several records, also can be used to find out the number of related records. inputs:&nbsp; entity &#8211; input with a record which related &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/retrieve-related-entities\/\"> <span class=\"screen-reader-text\">Retrieve Related Entities<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-894","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=894"}],"version-history":[{"count":4,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/894\/revisions"}],"predecessor-version":[{"id":2056,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/894\/revisions\/2056"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=894"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}