{"id":2492,"date":"2026-11-01T09:00:00","date_gmt":"2026-11-01T03:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/"},"modified":"2026-11-15T22:00:18","modified_gmt":"2026-11-15T16:30:18","slug":"salesforce-connect-custom-adapters","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/","title":{"rendered":"Salesforce Connect Custom Adapters Built in Apex"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Salesforce Connect Custom Adapters let you show data that lives in another system as if it were Salesforce records, without copying a single row. A user opens a list view, Salesforce calls your Apex, your Apex calls the service, and rows appear.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The appeal is storage and freshness together. A million historical invoices in an outside system cost nothing in Salesforce storage, and nobody has to run a nightly sync to keep them accurate.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-1-1024x640.png\" alt=\"Salesforce Connect Custom Adapters diagram showing query context, callout and rows\" class=\"wp-image-2490\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-1-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Caption: Your adapter receives the filters and fields the user asked for, so the service does the filtering.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Are Salesforce Connect Custom Adapters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce Connect Custom Adapters are one of three options. Salesforce Connect has ready made adapters for OData and for another Salesforce org. A custom adapter is the option when your service speaks none of those, which in practice means most REST APIs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You write two Apex classes.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Class<\/th><th>What it does<\/th><\/tr><\/thead><tbody><tr><td>A provider class<\/td><td>Declares what authentication and features you support<\/td><\/tr><tr><td>A connection class<\/td><td>Describes the tables and answers the queries<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The provider extends <code>DataSource.Provider<\/code> and is short.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>global class CourseProvider extends DataSource.Provider {\n\n    override global List&lt;DataSource.AuthenticationCapability&gt; getAuthenticationCapabilities() {\n        return new List&lt;DataSource.AuthenticationCapability&gt;{\n            DataSource.AuthenticationCapability.ANONYMOUS\n        };\n    }\n\n    override global List&lt;DataSource.Capability&gt; getCapabilities() {\n        return new List&lt;DataSource.Capability&gt;{\n            DataSource.Capability.ROW_QUERY,\n            DataSource.Capability.SEARCH\n        };\n    }\n\n    override global DataSource.Connection getConnection(DataSource.ConnectionParams p) {\n        return new CourseConnection();\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">The Connection Class Does the Work<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>global class CourseConnection extends DataSource.Connection {\n\n    override global List&lt;DataSource.Table&gt; sync() {\n        List&lt;DataSource.Column&gt; cols = new List&lt;DataSource.Column&gt;{\n            DataSource.Column.text('ExternalId', 255),\n            DataSource.Column.text('DisplayUrl', 255),\n            DataSource.Column.text('Title', 255),\n            DataSource.Column.number('Fee', 16, 2)\n        };\n        return new List&lt;DataSource.Table&gt;{\n            DataSource.Table.get('Archive_Course', 'Title', cols)\n        };\n    }\n\n    override global DataSource.TableResult query(DataSource.QueryContext context) {\n        List&lt;Map&lt;String, Object&gt;&gt; rows = fetchFromService(context);\n        return DataSource.TableResult.get(context, rows);\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce Connect Custom Adapters build their own schema. The <code>sync<\/code> method is what creates the external object and its fields in Setup. Run it once from the external data source page and Salesforce builds the schema for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two columns are required and easy to forget. <code>ExternalId<\/code> uniquely identifies a row, and <code>DisplayUrl<\/code> is where the View link points.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reading the Query Context<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The real craft in Salesforce Connect Custom Adapters is translating the query context into a request your service understands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private List&lt;Map&lt;String, Object&gt;&gt; fetchFromService(DataSource.QueryContext context) {\n    DataSource.Filter filter = context.tableSelection.filter;\n    String title = null;\n\n    if (filter != null &amp;&amp; filter.columnName == 'Title') {\n        title = String.valueOf(filter.columnValue);\n    }\n\n    HttpRequest req = new HttpRequest();\n    String url = 'callout:Archive_Service\/courses?limit=' + context.maxResults;\n    if (title != null) {\n        url += '&amp;title=' + EncodingUtil.urlEncode(title, 'UTF-8');\n    }\n    req.setEndpoint(url);\n    req.setMethod('GET');\n\n    HttpResponse res = new Http().send(req);\n    return (List&lt;Map&lt;String, Object&gt;&gt;) JSON.deserializeUntyped(res.getBody());\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Context property<\/th><th>What it tells you<\/th><\/tr><\/thead><tbody><tr><td>tableSelection.columnsSelected<\/td><td>Which fields the user asked for<\/td><\/tr><tr><td>tableSelection.filter<\/td><td>The WHERE clause, as a tree<\/td><\/tr><tr><td>tableSelection.order<\/td><td>The sort order<\/td><\/tr><tr><td>maxResults<\/td><td>How many rows to return<\/td><\/tr><tr><td>offset<\/td><td>Where to start, for paging<\/td><\/tr><tr><td>queryMoreToken<\/td><td>A continuation token for the next page<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce Connect Custom Adapters should push the filter down to the service whenever they can. An adapter that ignores the filter, fetches everything, and lets Salesforce filter afterwards works in a demo and falls over in production.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filters Are a Tree<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce Connect Custom Adapters receive filters as a tree, so a filter with <code>AND<\/code> or <code>OR<\/code> has subfilters rather than a single column. Handle the simple cases you support and return everything matching the parts you understood, rather than silently ignoring a condition.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (filter.type == DataSource.FilterType.AND_) {\n    for (DataSource.Filter sub : filter.subfilters) {\n        applyFilter(sub);\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Being honest here matters. A wrong row count is worse than a clear error, because nobody checks a list they believe is complete.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Salesforce Connect Custom Adapters Matter<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Benefit<\/th><th>What it gives you<\/th><\/tr><\/thead><tbody><tr><td>No storage cost<\/td><td>Millions of rows outside Salesforce<\/td><\/tr><tr><td>Always current<\/td><td>No sync job to go stale or fail<\/td><\/tr><tr><td>Real records in the interface<\/td><td>List views, detail pages, related lists<\/td><\/tr><tr><td>Works in Flow and Apex<\/td><td>SOQL queries the external object<\/td><\/tr><tr><td>One place for the logic<\/td><td>Every user sees the same mapping<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Flow and Apex point is what makes this more than a web tab. An external object is queryable with SOQL, so automation can read outside data like any other record. The post on <a href=\"https:\/\/swapnilzambare.com\/blog\/json-in-apex-serialize-deserialize\/\">JSON in Apex<\/a> covers shaping the service response.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Custom Adapter or Just Load the Data<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-2-1024x640.png\" alt=\"Salesforce Connect Custom Adapters and data load comparison diagram\" class=\"wp-image-2491\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-diagram-2-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Caption: Reporting needs are usually what decide this, not storage.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Need<\/th><th>Pick<\/th><\/tr><\/thead><tbody><tr><td>Reports and dashboards on the data<\/td><td>Load it in<\/td><\/tr><tr><td>Millions of rows read occasionally<\/td><td>Custom adapter<\/td><\/tr><tr><td>Data that must be current to the second<\/td><td>Custom adapter<\/td><\/tr><tr><td>Offline mobile access<\/td><td>Load it in<\/td><\/tr><tr><td>Roll up summaries and formulas<\/td><td>Load it in<\/td><\/tr><tr><td>An archive nobody edits<\/td><td>Custom adapter<\/td><\/tr><tr><td>Triggers on the records<\/td><td>Load it in<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That reporting row decides most projects. External objects have real reporting limits, and discovering that after the build is a painful conversation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Real Salesforce Connect Custom Adapters Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce Connect Custom Adapters solved an archive problem for us. Bright Path Tutors keeps eight years of completed enrolments in a separate archive service. Support staff need to look them up two or three times a day.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Option considered<\/th><th>Why it lost<\/th><\/tr><\/thead><tbody><tr><td>Load 2.4 million rows in<\/td><td>Storage cost, and a nightly job to maintain<\/td><\/tr><tr><td>A web tab to the archive<\/td><td>No search from the contact record<\/td><\/tr><tr><td>A custom adapter<\/td><td>Chosen<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Measure<\/th><th>Result<\/th><\/tr><\/thead><tbody><tr><td>Salesforce storage used<\/td><td>None<\/td><\/tr><tr><td>Lookups per day<\/td><td>Around 40<\/td><\/tr><tr><td>Average response<\/td><td>Under two seconds<\/td><\/tr><tr><td>Nightly jobs added<\/td><td>Zero<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The support team reaches the records from the contact page through an indirect lookup, so it feels like ordinary Salesforce. The archive team changed nothing on their side beyond adding a filter parameter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Limits and Things to Watch<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>External objects support a limited set of reporting features<\/li>\n\n<li>No triggers, workflow rules or roll up summary fields on them<\/li>\n\n<li>Writing back needs the write capabilities implemented, and many adapters stay read only<\/li>\n\n<li>Callout limits apply, so one list view is one callout and it must be quick<\/li>\n\n<li>Relationships use indirect or external lookups, which behave differently from normal lookups<\/li>\n\n<li>A slow service makes Salesforce look slow, since the user is waiting on your callout<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce Connect Custom Adapters put your service in the user path, so that last point is the one to design around. A list view that takes eight seconds will be blamed on Salesforce, not on the archive service. Set a timeout and return a clear error rather than letting the page hang.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Salesforce Connect Custom Adapters<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Mistake<\/th><th>What you see<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td>Ignoring the filter<\/td><td>Everything fetched every time<\/td><td>Push the filter down to the service<\/td><\/tr><tr><td>Missing ExternalId or DisplayUrl<\/td><td>Rows that cannot be opened<\/td><td>Declare both columns in sync<\/td><\/tr><tr><td>Not handling filter trees<\/td><td>Wrong row counts on AND queries<\/td><td>Walk the subfilters<\/td><\/tr><tr><td>No paging support<\/td><td>Only the first page ever appears<\/td><td>Use offset or the query more token<\/td><\/tr><tr><td>No timeout on the callout<\/td><td>A hanging list view<\/td><td>Set a timeout and fail clearly<\/td><\/tr><tr><td>Expecting reports to work fully<\/td><td>A late surprise<\/td><td>Confirm reporting needs before building<\/td><\/tr><tr><td>Hard coded endpoint and token<\/td><td>A security review failure<\/td><td>Use a named credential<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Named credentials are the right home for the endpoint and the token, and the post on <a href=\"https:\/\/swapnilzambare.com\/blog\/named-credentials-in-apex-callouts\/\">named credentials<\/a> walks through the setup. For the callout itself, the patterns in <a href=\"https:\/\/swapnilzambare.com\/blog\/apex-rest-callouts-httprequest\/\">Apex REST callouts<\/a> apply unchanged inside an adapter, including timeouts and response handling.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Salesforce Connect Custom Adapters<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Push filters, sorting and limits down to the service every time<\/li>\n\n<li>Declare only the columns you can actually return<\/li>\n\n<li>Use a named credential so the endpoint and token stay out of code<\/li>\n\n<li>Set an explicit timeout and return a readable error message<\/li>\n\n<li>Implement paging from the start, since a list view will ask for it<\/li>\n\n<li>Keep the mapping in one place so every consumer sees the same fields<\/li>\n\n<li>Confirm reporting requirements before choosing this over loading the data<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Most Asked Salesforce Connect Custom Adapters Interview Questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: What does Salesforce Connect do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It shows data from an outside system as records in Salesforce without copying it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: When do you need a custom adapter?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the service does not speak OData and is not another Salesforce org.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: Which two Apex classes does a custom adapter need?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A provider class and a connection class.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: What does the provider class declare?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The authentication options and the capabilities the adapter supports.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: What does the sync method do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It describes the tables and columns, which creates the external object and fields in Setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6: Which two columns are required?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ExternalId, which identifies a row, and DisplayUrl, which the View link uses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7: What arrives in the query context?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The selected columns, the filter, the sort order, the row limit and paging information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8: Why push the filter down to the service?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Otherwise every query fetches everything, which works in a demo and fails in production.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9: What shape is a filter?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A tree, so an AND or OR filter has subfilters rather than one column and value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10: What happens if you ignore part of a filter?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The row count is wrong, which is worse than an error because nobody questions it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11: How does paging work?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Through the offset, or a query more token your adapter returns and receives.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12: Can you write back through an external object?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only if the adapter implements the write capabilities, and many stay read only.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13: Can you put a trigger on an external object?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No. Triggers, workflow rules and roll up summaries are not available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14: Can you report on external objects?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a limited way, which is usually the reason a project loads the data instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15: How do relationships work?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Through indirect lookups and external lookups, which behave differently from normal lookups.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16: What is an indirect lookup?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A relationship that matches an external object to a Salesforce record through a unique field value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17: Do callout limits apply?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Each query is a callout, so the service must answer quickly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18: How should authentication be handled?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With a named credential, so the endpoint and token stay out of the Apex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19: Does this save storage?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, entirely, since the data never enters Salesforce.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20: Does it need a sync job?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No, which is the other main benefit, since the data is always current.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21: Scenario: a list view takes nine seconds. Who gets blamed?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce. So set a timeout and return a clear error instead of hanging.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q22: Scenario: a filtered search returns too many rows. What went wrong?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Part of the filter tree was ignored, so the service filtered on less than the user asked.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q23: Scenario: users can see rows but not open them. What is missing?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The DisplayUrl column, which the View link needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q24: Scenario: only the first 20 rows ever appear. Why?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Paging is not implemented, so the adapter answers the first request and nothing more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q25: Scenario: the business asks for a dashboard on this data. What now?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Expect to load the data in, since external object reporting is limited.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q26: Can SOQL query an external object?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, which is what makes it usable from Flow and Apex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q27: How do you test an adapter?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With callout mocks for the service and unit tests on the filter translation logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q28: What is the quickest way to debug a wrong result?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Log the query context and the URL your adapter built, then compare the two.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q29: What is the single habit that keeps an adapter usable?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Translate every filter you claim to support, and be explicit when you cannot support one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/\" target=\"_blank\" rel=\"noopener noreferrer\">Apex Developer Guide<\/a><\/li>\n\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=platform.platform_connect_about.htm&amp;type=5\" target=\"_blank\" rel=\"noopener noreferrer\">Salesforce Connect in Salesforce Help<\/a><\/li>\n\n<li><a href=\"https:\/\/trailhead.salesforce.com\/content\/learn\/modules\/apex_integration_services\" target=\"_blank\" rel=\"noopener noreferrer\">Apex Specialist on Trailhead<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What Is Next<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Next, read <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-event-relay-aws\/\">Salesforce Event Relay to Amazon EventBridge Explained<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Salesforce Connect Custom Adapters let you show data that lives in another system as if it were Salesforce records, without copying a single row.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":2489,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[246,8,96],"tags":[68,98,81],"swapz_series":[],"class_list":["post-2492","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-integration-apis","category-salesforce","category-salesforce-developer","tag-advanced","tag-apex","tag-integration"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Salesforce Connect Custom Adapters with Apex<\/title>\n<meta name=\"description\" content=\"Salesforce Connect Custom Adapters show outside data as records without copying it. Learn the Apex classes, the query translation, and the real limits.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Salesforce Connect Custom Adapters with Apex\" \/>\n<meta property=\"og:description\" content=\"Salesforce Connect Custom Adapters show outside data as records without copying it. Learn the Apex classes, the query translation, and the real limits.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-01T03:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-15T16:30:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\"},\"headline\":\"Salesforce Connect Custom Adapters Built in Apex\",\"datePublished\":\"2026-11-01T03:30:00+00:00\",\"dateModified\":\"2026-11-15T16:30:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/\"},\"wordCount\":1757,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-connect-custom-adapters-featured.png\",\"keywords\":[\"Advanced\",\"Apex\",\"Integration\"],\"articleSection\":[\"Integration and APIs\",\"Salesforce\",\"Salesforce Developer\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/\",\"name\":\"Salesforce Connect Custom Adapters with Apex\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-connect-custom-adapters-featured.png\",\"datePublished\":\"2026-11-01T03:30:00+00:00\",\"dateModified\":\"2026-11-15T16:30:18+00:00\",\"description\":\"Salesforce Connect Custom Adapters show outside data as records without copying it. Learn the Apex classes, the query translation, and the real limits.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-connect-custom-adapters-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-connect-custom-adapters-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Salesforce Connect Custom Adapters featured image showing outside data appearing as Salesforce records\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-connect-custom-adapters\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Salesforce Connect Custom Adapters Built in Apex\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Salesforce Connect Custom Adapters with Apex","description":"Salesforce Connect Custom Adapters show outside data as records without copying it. Learn the Apex classes, the query translation, and the real limits.","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:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/","og_locale":"en_US","og_type":"article","og_title":"Salesforce Connect Custom Adapters with Apex","og_description":"Salesforce Connect Custom Adapters show outside data as records without copying it. Learn the Apex classes, the query translation, and the real limits.","og_url":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-11-01T03:30:00+00:00","article_modified_time":"2026-11-15T16:30:18+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a"},"headline":"Salesforce Connect Custom Adapters Built in Apex","datePublished":"2026-11-01T03:30:00+00:00","dateModified":"2026-11-15T16:30:18+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/"},"wordCount":1757,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-featured.png","keywords":["Advanced","Apex","Integration"],"articleSection":["Integration and APIs","Salesforce","Salesforce Developer"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/","url":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/","name":"Salesforce Connect Custom Adapters with Apex","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-featured.png","datePublished":"2026-11-01T03:30:00+00:00","dateModified":"2026-11-15T16:30:18+00:00","description":"Salesforce Connect Custom Adapters show outside data as records without copying it. Learn the Apex classes, the query translation, and the real limits.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-connect-custom-adapters-featured.png","width":2400,"height":1260,"caption":"Salesforce Connect Custom Adapters featured image showing outside data appearing as Salesforce records"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-connect-custom-adapters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Salesforce Connect Custom Adapters Built in Apex"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/2492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=2492"}],"version-history":[{"count":2,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/2492\/revisions"}],"predecessor-version":[{"id":3400,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/2492\/revisions\/3400"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/2489"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=2492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=2492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=2492"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=2492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}