formContext.data.save (Client API reference)
Saves the record asynchronously with the option to set callback functions to be executed after the save operation is completed.
You can also set an object to control how appointment, recurring appointment, or service activity records are processed.
Syntax
formContext.data.save(saveOptions).then(successCallback, errorCallback);
Parameters
Name | Type | Required | Description |
---|---|---|---|
saveOptions |
Object | No | An object for specifying options for saving the record. The object has following parameters: - saveMode : (Optional) Number. Specify a value indicating how the save event was initiated. For a list of supported values, see the return value of the getSaveMode method. Note that setting the saveMode does not actually take the corresponding action; it is just to provide information to the OnSave event handlers about the reason for the save operation.- useSchedulingEngine : (Optional) Boolean. Indicate whether to use the Book or Reschedule messages rather than the Create or Update messages. This option is only applicable when used with appointment, recurring appointment, or service activity records.NOTE: useSchedulingEngine property is not supported in Unified Interface. |
successCallback |
Function | No | A function to call when the operation succeeds. |
errorCallback |
Function | No | A function to call when the operation fails. An object with the following properties will be passed: - errorCode : Number. The error code.- message : String. A localized error message. |
Note
When working with forms, and you call the formContext.data.save
method, make sure that you also call the preventDefault to ensure that any default save operation is not triggered when a user saves the form.
Related articles
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기