{"id":"tooling_api_objects_metadatacomponentdependency","title":"MetadataComponentDependency (Beta)","content":"<a name=\"tooling_api_objects_metadatacomponentdependency\"><!-- --></a><h1 class=\"helpHead1\"><span class=\"ph\" id=\"topic_title\"><a name=\"topic_title\"><!-- --></a>MetadataComponentDependency (Beta)</span></h1><div class=\"body refbody\">\n<div class=\"shortdesc\">\n        <span class=\"ph\" id=\"represents\"><a name=\"represents\"><!-- --></a>Represents dependency relationships between the metadata components in\n            your org</span>. You can query MetadataComponentDependency using Tooling API in API\n        version 43.0 and later or using Bulk API 2.0 in API 49.0 and later.</div>\n\n        <div class=\"section\">\n            <div class=\"box message info\"><div class=\"inner\"><div class=\"bd\"><div class=\"media\">\n<img class=\"img mtm\" src=\"/docs/resources/img/en-us/264.0?doc_id=images%2Ficon_note.png&folder=api_tooling\" alt=\"Note\"><div class=\"mediaBd\">\n<h4 class=\"mbs\">Note</h4>\n<p>As a Beta feature, MetadataComponentDependency (Dependency API) is a preview and\n                isn’t part of the “Services” under your Main Services Agreement with Salesforce. Use\n                this feature at your sole discretion, and make your purchase decisions based on the\n                generally available products and features. Salesforce doesn’t guarantee general\n                availability of this feature within any particular time frame or at all, and we can\n                discontinue it at any time. This feature is for evaluation purposes only, not for\n                production use. It’s offered as is and isn’t supported. Salesforce has no liability\n                for any harm or damage arising out of the use of this feature. All restrictions,\n                Salesforce reservation of rights, obligations concerning the Services, and terms for\n                related Non-Salesforce Applications and Content apply equally to your use of this\n                feature. You can provide feedback and suggestions in the <a class=\"xref\" href=\"https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A00000020Vu\" target=\"_blank\" title=\"HTML (New Window)\">Dependency API/Field Usage\n                    (Beta)</a> Trailblazer Community group page. </p>\n</div>\n</div></div></div></div>\n\n        </div>\n\n        <div class=\"section\">\n<h2 class=\"helpHead2\">Supported SOAP Calls</h2>\n\n            \n            <p class=\"p\"><samp class=\"codeph nolang\">query()</samp></p>\n\n        </div>\n\n        <div class=\"section\">\n<h2 class=\"helpHead2\">Supported REST HTTP Methods</h2>\n\n            \n            <p class=\"p\">Tooling API—<samp class=\"codeph nolang\">GET</samp></p>\n\n            <p class=\"p\">Bulk API 2.0—<samp class=\"codeph nolang\">POST</samp>, <samp class=\"codeph nolang\">GET</samp>, <samp class=\"codeph nolang\">PATCH</samp>,\n                    <samp class=\"codeph nolang\">DELETE</samp></p>\n\n        </div>\n\n        <div class=\"section\">\n<h2 class=\"helpHead2\">Limitations</h2>\n\n            \n            <div class=\"p\">Tooling API<ul class=\"ul bulletList\">\n                    <li class=\"li\">No more than 2000 records in a single query.</li>\n\n                    <li class=\"li\">Reports are not included in MetadataComponentDependency queries. Use Bulk\n                        API 2.0 for dependency relationships that include reports.</li>\n\n                </ul>\n</div>\n\n            <div class=\"p\">Bulk API 2.0<ul class=\"ul bulletList\">\n                    <li class=\"li\">No more than 100,000 records in a single query.</li>\n\n                </ul>\n</div>\n\n            <p class=\"p\">The following SOQL queries are not supported in both Tooling API and Bulk API 2.0</p>\n\n            <div class=\"p\">\n                <ul class=\"ul bulletList\">\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">ORDER BY</samp> clause</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">SELECT</samp> clause: <samp class=\"codeph soql\">count()</samp> function</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">queryMore()</samp>\n</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">WHERE</samp> clause: any type of filter\n                        with <span class=\"keyword parmname\">MetadataComponentName</span>\n</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">WHERE</samp> clause: any type of filter\n                        with <span class=\"keyword parmname\">RefMetadataComponentName</span>\n</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">WHERE</samp> clause: contains operators\n                            <em class=\"ph i\">other</em> than <samp class=\"codeph soql\">=</samp>, <samp class=\"codeph soql\">!=</samp>, <samp class=\"codeph soql\">AND</samp>,\n                        or <samp class=\"codeph soql\">OR</samp>\n</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">WHERE</samp> clause: filter by (<samp class=\"codeph soql\">RefMetadataComponentType =\n                        ‘StandardEntity’</samp>)</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">WHERE</samp> clause: use of the <samp class=\"codeph soql\">LIKE</samp> operator with either the\n                            <span class=\"keyword parmname\">MetadataComponentType</span> field or the\n                            <span class=\"keyword parmname\">RefMetadataComponentType</span> field</li>\n\n                    <li class=\"li\">SOQL <samp class=\"codeph soql\">OFFSET</samp> clause </li>\n\n                </ul>\n\n            </div>\n\n            <p class=\"p\"><a class=\"xref\" href=\"atlas.en-us.api_tooling.meta/api_tooling/reference_objects_soql_limits.htm\" title=\"Some Tooling API objects have SOQL limitations. These limitations apply to any Metadata Catalog query, which applies to all Custom Metadata Types and Metadata Catalog entities, not only the ones explicitly listed.\">SOQL Limitations</a></p>\n\n            <p class=\"p\"><a class=\"xref\" href=\"atlas.en-us.api_tooling.meta/api_tooling/reference_objects_sosl_limits.htm\" title=\"Two Tooling API objects, EntityDefinition and FieldDefinition, have some SOSL limitations. ExternalString and MetadataComponentDependency (Beta) don’t support SOSL searches.\">SOSL Limitations</a></p>\n\n        </div>\n\n        <div class=\"section\">\n<h2 class=\"helpHead2\">Fields</h2>\n\n            \n            \n<div class=\"data colSort\"><table class=\"featureTable sort_table\" summary=\"\">\n                    \n                    \n                    <thead class=\"thead sorted\" align=\"left\">\n                        <tr>\n                            <th class=\"featureTableHeader  \" id=\"d215061e240\">Field</th>\n\n                            <th class=\"featureTableHeader  \" id=\"d215061e243\">Details</th>\n\n                        </tr>\n\n                    </thead>\n\n                    <tbody class=\"tbody\">\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">MetadataComponentId</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The ID of a metadata component that depends on another\n                                                component.<p class=\"p\">The component with the ID listed in the\n                                                output as <span class=\"keyword parmname\">MetadataComponentId</span>\n                                                has a reference to the component with its ID listed\n                                                as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentId</span>.</p>\n<p class=\"p\"><span class=\"keyword parmname\">MetadataComponentId</span>\n                                                is a string field that usually contains either an\n                                                18-character ID or a standard object name. Use\n                                                18-character IDs, not 15-character IDs, in your\n                                                queries of this field.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">MetadataComponentName</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The name of a metadata component that depends on another\n                                            component. For example, <samp class=\"codeph apex_code\">YourClass</samp> for an Apex class or <samp class=\"codeph nolang\">yourField</samp> (without the\n                                                <samp class=\"codeph nolang\">__c</samp> suffix) for\n                                            a custom field.<p class=\"p\">The component with the name listed in\n                                                the output as\n                                                  <span class=\"keyword parmname\">MetadataComponentName</span> has a\n                                                reference to the component with its name listed as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentName</span>.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">MetadataComponentNamespace</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The namespace of a metadata component that depends on\n                                            another component.<p class=\"p\">The component with the namespace\n                                                listed in the output as\n                                                  <span class=\"keyword parmname\">MetadataComponentNamespace</span>\n                                                has a reference to the component with its namespace\n                                                listed as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentNamespace</span>.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">MetadataComponentType</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The type of a metadata component that depends on another\n                                                component.<p class=\"p\">The component with the type listed in\n                                                the output as\n                                                  <span class=\"keyword parmname\">MetadataComponentType</span> has a\n                                                reference to the component with its type listed as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentType</span>.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">RefMetadataComponentId</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The ID of a metadata component that another component\n                                            depends on.<p class=\"p\">The component with the ID listed in the\n                                                output as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentId</span> is\n                                                referenced by the component with its ID listed as\n                                                  <span class=\"keyword parmname\">MetadataComponentId</span>.</p>\n<p class=\"p\"><span class=\"keyword parmname\">RefMetadataComponentId</span>\n                                                is a string field that usually contains either an\n                                                18-character ID or a standard object name. Use\n                                                18-character IDs, not 15-character IDs, in your\n                                                queries of this field.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">RefMetadataComponentName</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The name of a metadata component that another component\n                                            depends on. For example, <samp class=\"codeph apex_code\">YourClass</samp> for an Apex class or <samp class=\"codeph nolang\">yourField</samp> (without the\n                                                <samp class=\"codeph nolang\">__c</samp> suffix) for\n                                            a custom field.<p class=\"p\">The component with the name listed in\n                                                the output as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentName</span> is\n                                                referenced by the component with its name listed as\n                                                  <span class=\"keyword parmname\">MetadataComponentName</span>.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">RefMetadataComponentNamespace</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The namespace of a metadata component that another\n                                            component depends on.<p class=\"p\">The component with the namespace\n                                                listed in the output as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentNamespace</span>\n                                                is referenced by the component with its namespace\n                                                listed as\n                                                  <span class=\"keyword parmname\">MetadataComponentNamespace</span>.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                        <tr>\n                            <td class=\"entry\" headers=\"d215061e240\" data-title=\"Field\"><span class=\"keyword parmname\">RefMetadataComponentType</span></td>\n\n                            <td class=\"entry\" headers=\"d215061e243\" data-title=\"Details\">\n                                <dl class=\"dl detailList\">\n                                    \n                                        <dt class=\"dt dlterm\">Type</dt>\n\n                                        <dd class=\"dd\">string</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Properties</dt>\n\n                                        <dd class=\"dd\">Filter, Group, Nillable, Sort</dd>\n\n                                    \n                                    \n                                        <dt class=\"dt dlterm\">Description</dt>\n\n                                        <dd class=\"dd\">The type of a metadata component that another component\n                                            depends on.<p class=\"p\">The component with the type listed in the\n                                                output as\n                                                  <span class=\"keyword parmname\">RefMetadataComponentType</span> is\n                                                referenced by the component with its type listed as\n                                                  <span class=\"keyword parmname\">MetadataComponentType</span>.</p>\n</dd>\n\n                                    \n                                </dl>\n\n                            </td>\n\n                        </tr>\n\n                    </tbody>\n\n                </table></div>\n\n        </div>\n\n    </div><div id=\"sfdc:seealso\" class=\"related-links\">\n<ul class=\"ullinks\">\n<li class=\"link ulchildlink\">\n<strong><a href=\"atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacomponentdependency_tooling_usage.htm\">Tooling API Usage</a></strong><br>\nUse SOQL queries to list the relationships between the metadata components in your org.   The query results include one row for each relationship. Each relationship is a directional   dependency between two metadata components.</li>\n<li class=\"link ulchildlink\">\n<strong><a href=\"atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacomponentdependency_bulk2_usage.htm\">Bulk API 2.0 Usage</a></strong><br>\nUsing Bulk API 2.0, you can query the MetadataComponentDependency Tooling API object and   retrieve up to 100,000 records in a single query. Use SOQL queries to list the relationships   between the metadata components in   your   org.</li>\n</ul>\n</div>"}