MB-500 · Question #21
You are a Dynamics 365 Finance developer. You must extend the validateWrite method of the SalesLine table by using Chain of Command. The value of a variable named SalesPrice must be greater than or…
The correct answer is B. [ExtensionOf(tableStr(SalesLine))] final class SalesLine_Extension { boolean validateWrite(boolean _skipCreditLimitCheck = false) { boolean ret; ret = next validateWrite(_skipCreditLimitCheck); if (ret && this.SalesPrice < 0) { ret = false; } return ret; } } D. [ExtensionOf(tableStr(SalesLine))] final class SalesLine_Extension { boolean validateWrite(boolean _skipCreditLimitCheck) { boolean ret; try { ret = next validateWrite(_skipCreditLimitCheck); } catch (Exception::Error) { ret = false; } if (ret && this.SalesPrice < 0) { ret = false; } return ret; } }. Incorrect Answers: B: Can't use = false in the 4th line. C: Second line must be start final class, public class https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/validations- defaults-unmapped-fields…
Question
Exhibits
Options
- A[ExtensionOf(tableStr(SalesLine))] final class SalesLine_Extension { boolean validateWrite(boolean _skipCreditLimitCheck) { boolean ret; ret = next validateWrite(_skipCreditLimitCheck); if (ret && this.SalesPrice < 0) { ret = false; } return ret; } }
- B[ExtensionOf(tableStr(SalesLine))] final class SalesLine_Extension { boolean validateWrite(boolean _skipCreditLimitCheck = false) { boolean ret; ret = next validateWrite(_skipCreditLimitCheck); if (ret && this.SalesPrice < 0) { ret = false; } return ret; } }
- C[ExtensionOf(tableStr(SalesLine))] public class SalesLine_Extension { boolean validateWrite(boolean _skipCreditLimitCheck) { boolean ret; ret = next validateWrite(_skipCreditLimitCheck); if (ret && this.SalesPrice < 0) { ret = false; } return ret; } }
- D[ExtensionOf(tableStr(SalesLine))]
final class SalesLine_Extension
{
boolean validateWrite(boolean _skipCreditLimitCheck)
{
boolean ret;
try
{
ret = next validateWrite(_skipCreditLimitCheck);
}
catch (Exception::Error)
{
ret = false;
}
}if (ret && this.SalesPrice < 0) { ret = false; } return ret; }
How the community answered
(32 responses)- A31% (10)
- B56% (18)
- C13% (4)
Explanation
Incorrect Answers: B: Can't use = false in the 4th line. C: Second line must be start final class, public class https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/validations- defaults-unmapped-fields https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/extensibility/method-
Topics
Community Discussion
No community discussion yet for this question.



