save (Client API reference)

Applies to Dynamics 365 for Customer Engagement apps version 9.x

Saves the record synchronously with the options to close the form or open a new form after the save is completed.

Syntax

formContext.data.entity.save(saveOption);

Parameters

Name Type Required Description
saveOption String No Specify options for saving the record. If no parameter is included in the method, the record will simply be saved. This is the equivalent of using the Save command.
You can specify one of the following values:

- saveandclose: This is the equivalent of using the Save and Close command.

- saveandnew: This is the equivalent of the using the Save and New command.

Example

To open a new form after the save is completed:

formContext.data.entity.save("saveandnew");

formContext.data.save

formContext