web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom Api - Error on ...
Power Apps
Unanswered

Custom Api - Error on user Custom closed types

(0) ShareShare
ReportReport
Posted on by 143

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.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard