Modify External Data with Writable External Objects

Now your users can create, edit, and delete external object records without leaving the Salesforce user interface! For example, users can see all orders that reside in an SAP system and are associated with an account in Salesforce. They can also place a new order or route an existing order without leaving the Salesforce user interface. As a developer or admin, use a specialized set of asynchronous Apex operations to create, update, and delete external object records. This feature is available in both Lightning Experience and Salesforce Classic.

Lightning Connect external data sources are available in: Developer Edition and for an extra cost in: Enterprise, Performance, and Unlimited Editions.



You can make external objects writable only when an OData or Apex custom adapter is used to connect Salesforce with the external data source. Writable external objects aren’t supported with the Salesforce adapter for Lightning Connect.

When users create, modify, or delete external object records via the user interface, the operations occur synchronously, as with standard and custom object records. When developers use Apex to manipulate external object records, asynchronous timing and an active background queue minimize potential save conflicts.

A new set of Apex methods and keywords handles potential timing issues with write execution. Apex also lets you retrieve the results of delete and upsert operations. The BackgroundOperation object lets you monitor job progress for write operations via the API or SOQL.

It’s easy to make external objects writable. From Setup, enter External in the Quick Find box, then select External Data Source. By default, external objects associated with external data sources are read only. When you create or edit an external data source, you can make all its associated external objects writable. Select Allow Create, Edit, and Delete on the External Data Source page, as shown.

Make an External Data Source Writable Allow Create, Edit, and Delete for an External Data Source