Hello everybody,
I am trying to follow the guide on this link for use custom closed type inside a Custom Api.
I am able to use open type, so actually I take an input parameters, cast it as an entity and I can read custom properties. But if I try to cast it as a Location class, that inherit from Entity, the CRM throw an error about invalid cast.
It is the same in output. If I create an entity without logical name, I can return that entity as a json object. But if I create the Location class as in the example and try to return it, I receive an error like "Incorrect Json".
As anybody tried to use custom closed types on a custom api? It would be really useful. I am already using open type, but using custom closed type would improve my code.


Report
All responses (
Answers (