0

I want to set argument in a .net service methot. This method parameter type Nullable'1.

I create a method which name is findLastDate, return type of this method is TransDate. But when run the process take an error ;

System.NotSupportedException: DateTimeConverter cannot convert from Microsoft.Dynamics.Ax.Xpp.AxShared.utcdatetime.

Then i change findLastDate method's returntype to utcDateTime but unfortunately.

How can i fill this service method?

enter image description here

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
Mumble
  • 141
  • 1
  • 8

1 Answers1

2

It looks like your issue isn't related to null but due to marshaling AX and CLR types.

See - https://learn.microsoft.com/en-us/dynamicsax-2012/developer/how-to-marshal-between-x-and-clr-primitive-types#code-sample-for-systemdatetime for how to marshal between the two.

I linked to the System.DateTime example in the article.

Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71