
Explanation
Graphical user interface, text, application Description automatically generated

Box 1: Yes
getFormTyp gets the form type for the record.
Form type 2 is Update.
Note: Syntax: formContext.ui.getFormType();
Return Value
Type: Number
Description: Form type. Returns one of the following values
RETURN VALUE
Value Form type
0 Undefined
1 Create
2 Update
3 Read Only
4 Disabled
6 Bulk Edit
Box 2: Yes
Xrm.WebApi.updateRecord Return Value: On success, returns a promise object containing the values specified earlier in the description of the successCallback parameter.
Note:
Syntax: Xrm.WebApi.updateRecord(entityLogicalName, id, data).then(successCallback, errorCallback); Where errorCallback: A function to call when the operation fails. An object with the following properties will be passed:
errorCode: Number. The error code.
message: String. An error message describing the issue.
Box 3: No
It will displayed even if the update fails.
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-ui/get
https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-webapi/updat