Skip to content

A projection customization adds a checkbox-style Boolean attribute to an entity, which correctly renders as a checkbox in the client, but saving a record fails with a deserialization error ('Invalid json type: BOOLEAN for Edm.String property'). What's actually wrong?

Answer

The attribute type on the entity being Boolean isn't enough on its own — the projection action's own parameter declaration (and the matching method signature in the .plsvc file) also needs to be declared as a Boolean type, not Text/String. If the action parameter is still typed as Text while the entity attribute is Boolean, the framework tries to deserialize an incoming JSON boolean value into a string parameter and fails with exactly this error; updating both the action parameter type and its .plsvc method declaration to Boolean resolves it.

← Browse Developer Studio, deployment, and upgrades questions