Please guide me iam getting below error in ax 2012...
How can I resolve this error
Please guide me iam getting below error in ax 2012...
How can I resolve this error
I think you are confusing it with DateTime. Or what you are looking for is systemdateget
community.dynamics.com/.../difference-between-today-and-systemdateget-methods
Thanks..
Well, there's not a method called DateTimeUtil::getSystemDate, so you will get an error.
If you type DateTimeUtil:: the IntelliSense shows you what's available.
If you need the current date, you can use systemDateGet() function.
Generally I'd like to suggest that you participate in some development basics course, so that you'll learn to the basics of the x++ syntax, IntelliSense and other things.
I have changed the variable name and the error now showing in the below line
getSystemDate(clientTimezone);error I am getting:GetSystemDate Is not a class method
As others already pointed out, you can't use "today" as a variable name.
Public boolean Validate field(FieldId _fieldIdToCheck)
{
Timezone clientTimeZone;
TransDate today;(Getting error in this line : variable TransDate has not been declared)
boolean IsValid;
Is valid = super(_fieldIdToCheck);
switch (_fieldIdToCheck)
{
case FieldNum(FMS_ResortTable, Acquisition Date):
clientTimeZone = DateTimeUtil::getClientMachineTimeZone();
today = DateTimeUtil::getSystemDate(clientTimeZone);
if(this.AcquisitionDate < today)
{
IsValid = CheckFailed ("FMS23");
}
break;
}
return IsValid;
}
Don't use today as a variable name
Iam unable to paste the code here..
Please give us your code as text, so we can see it in full and compile it ourselves.
Use Insert > Code (in the rich formatting view) to paste it here.
Declare the variable at top of the method..again same error showing.
André Arnaud de Cal...
293,202
Super User 2025 Season 1
Martin Dráb
231,923
Most Valuable Professional
nmaenpaa
101,156
Moderator