MobileCRM.UI.EntityForm.saveAndClose - Resconet/JSBridge GitHub Wiki

Saves edited entity and closes the form.

This example demonstrate how to call save and close command while you are on form

function saveAndCloseForm() {
	MobileCRM.UI.EntityForm.requestObject(function (entityForm) {
		/// <param name="entityForm" type="MobileCRM.UI.EntityForm"/>
		if (entityForm)
			MobileCRM.UI.EntityForm.saveAndClose();
	}, function (err) {
		MobileCRM.bridge.alert("An error occurred: " + err);
	}, null);
}