Question 64 of 103 from exam MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer

Question 64 of 103 from exam MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer

Question

HOTSPOT - You are a Dynamics 365 Finance developer.

You have the following code: (Line numbers are created for reference only.)

01 class TestQuestion

02 {

03 public static void main(Args _args)

04 {

05 TestQuestion testQuestion = new testQuestion () ;
06 testQuestion. run () ;

07 }

08 public void run()

09 {

10 TmpFrmVirtual tmpFrnVirtual;

11 str salesId;

12 int salesQty

13 tmpFrmVirtual.Id = “SID1234”;

14 salesQty = 5;

15 this. updateValues (tmpFrmVirtual, int2Str(salesQty) ) ;
16 info (tmpFrmVirtual . Id) ;

17 info (salesQty);

18 }

19 public void updateValues (TmpFrmVirtual _tmpFrmVirtual, str _salesQty)
20 {

21 TmpFrmVirtual tmpFrmVirtual = _tmpFrmVirtual;
22 int salesQty = _str2int(salesQty) ;

23 tmpFrnVirtual.Id = “SID1234”-Updated”;

24 salesQty = 10;

25 }

26 }

Which values does the info() method return? To answer, select the appropriate option in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Answer Area

Parameter Value

tmpFrmVirtual.Id

S1D1234
SID1234Updated
$1D1234 SID1234-Updated

salesQty

10
15

Explanations

Answer Area

Parameter Value

tmpFrmVirtual.Id

$1D1234
SID1234Updated
$1D1234 SID1234-Updated

salesQty

10
15

Box 1: SID1234 - Parameters - All methods have their own scope.

A method can take one or more parameters.

Within the scope of the method, these parameters are treated as local variables and are initialized with a value from the parameter in the method call.

All parameters are passed by value, which means that you can't change the value of the original variable.

You can change only the local variable in the method.

This local variable is a copy of the original variable.

Box 2: 5 - Reference: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-classes-methods.