On AX2009 I have a week and year, say 21 and 2016. On a batch job running on server I have to calculate what is the starting date for that week.
What is the easiest way to do this, keeping in mind that in some countries weeks start on Sunday and in others on Monday? Also, the year change like in 2012/2013 should be handled.
Or is there a way to do this without the the client-side Global
methods at all?
You can use .NET for that. There are already questions around how to do this in C# (like this one) so I think it should be straightforward to port it to X++.
Keep in mind to assert appropriate InteropPermission
before calling .NET
new InteropPermission(InteropKind::ClrInterop).assert();