I’m currently struggling with something which isn’t supposed to be so hard.
In the plugin I’m building, I’ve got an action which is supposed to return an object. I’ve defined this object as a type “Test” which has two attributes: “text” (Text) and “id” (Number).
The only thing I try to do is to return a Test Object but Bubble doesn’t seem to get it.
Bubble supports returning an object from a server-side action (the properties of which are defined in the Retuned values section above the Action code section depicted in your screenshot), but you can’t define the “type” of the returned object.
Also, it looks as though you might have used the Fields (inputs) section to define your outputs (Returned values).
What do the Fields and Returned values of your action look like?
p.s. This post probably belongs in the Plugin Builders section of the forum. I think this section is more for those needing help using plug-ins.
As you can see on the screenshot below I’ve defined the desired returned Type as a “Test” object. Thus, I guess I need to return an object with the same attributes as my “Test” data type to be able to process them as a Bubble Object.
That appears to me to be what you’ve defined in the Fields section, and that’s an input for the action. When defining Returned values, you should see only Bubble native types.
If you are really really sure that you need to define a custom return type, there is a sophisticated hack, but bear in mind that it is not sanctioned by Bubble and is not for the uninitiated. I would strongly urge you to at least get one normal server-side action working and understand it first.