function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pablo GarciaPablo Garcia 

Can't select Custom Adaptor for a External Datasource


I want to create an External Datasource with type Lightning Connect - custom <myApexClass>, so I ve created both apex classes, one extending DataSource.Connection, and another one extending Datasource.Provider. In both cases, I have written the mandatory methods, as sync().

After this I have created the External Datasource, selecting my DataSource.Connection class the type field. But, after modifying the method query() in this class (and compiling it without errors), the External Datasource remain invalid:
The external data source "Catastro_DS" is invalid because its associated Apex class cant be found or has compilation errors. While this error persists, your users sometimes see "​​insufficient privileges" or other misleading errors when they try to access the external objects that are associated with this external data source.
And the External Datasource field Type is empty. I edit the External Datasource, I can't select my custom connector. It seems like the class has desapear. But I can see it in the Apex Class list (and it compiles well).

Thanks in advance!