Hello,
Need some help on my confusion for passing parameters when calling a method. As per my understanding, we can defaulted the value of the parameters by assigning the default value inside the bracket of the method ?
I'm creating a private method in my class like below :
private int revRecCalculateOccurrences(
TransDate _startDate,
TransDate _endDate,
RevRecRecognitionBasis _recognitionBasis = RevRecRecognitionBasis::None)
{
.
.
}
My expectation is the 3rd parameter is an optional and when it is not define when it is called, it will take the default RevRecRecognitionBasis::None
I call this method like this :
salesLine.RevRecOccurrences = this.revRecCalculateOccurrences(MyDate1, MyDate2);
Is there something wrong, since it is giving me error like this :
Severity Code Description Project File Line Suppression State
Error 'MyClass.revRecCalculateOccurrences' is missing argument 3 of type 'Enumeration(RevRecRecognitionBasis)'.
Thanks