ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 51 - PL-400 discussion

Report
Export

HOTSPOT

You are examining code written by another developer that is not functioning correctly. There are no other JavaScript or business rules in use on the form.

This code is properly registered to the OnChange event of the telephone1 field on an account entity form. The main operation is to update the primary contact's phone number when the account phone number changes. The primary contact field is a lookup. (Line numbers are included for reference only.)

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.


Question 51
Correct answer: Question 51

Explanation:

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/getformtype

https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-webapi/updaterecord

asked 05/10/2024
Nicolas Del Borrello
41 questions
User
0 comments
Sorted by

Leave a comment first