How to Refresh and Save the Form

// executionContext is passed as function parameter
var formContext = executionContext.getFormContext();

// Save and refresh the form
formContext.data.refresh(true);

// Refresh the form (without saving)
formContext.data.refresh(false);

Source: formContext.data (Client API reference)