Sorry - that wasn't meant to sound like a complaint.
I've been looking here as a source: docs.microsoft.com/.../devenv-programming-in-al
If I take the api query object as an example:
docs.microsoft.com/.../devenv-api-querytype
The caption property:
docs.microsoft.com/.../devenv-caption-property
Is, as far as I can tell, a mandatory field (if I omit it the package compiles and publishes, but goes to an error page). The doc doesn't mention this.
Maybe it's a function of the language being relatively new - or devs having come over from nav / CSIDE (which I've never used) - but there seems to be lack of reference material. Again - not a complaint - just struggling to find the answers and wondering if there is another source developers are using.
For the data type issue. My understanding was that the OData component picks up the expected datatypes from a metadata call first? I can't remove the caption. I can't see that I can convert the data type (explicitly cast it as a DATETIME).
If it's a full date time (i.e., has both data and time values) then it works fine. But '2019-12-10 00:00:00' would throw an error. And '1792-01-01 08:21' would also throw an error.
Thanks!