Browsing through attributes of a Structure Attribues in extention - Java stack

Browsing through attributes of a Structure Attribues in extention - Java stack

  

Hi,

I am creating an extention in Java that needs to check the default value of the Structure Attribute and if the "Send Default Value" flag is set to "Yes". I am not sure how to do it - is there any kind of documentation to outsystems.hubedition classes and methods? Can it be done with IRecord? 

Hi Wojciech,

As far as I know, there's no documentation. I think all you can do is inspect everything through reflection or debugging, and see whether the information is there.

Uh, it seems that my approach is simply wrong. I am passing a structure (or actually list with a structure - generated from wsdl/xsd - that is passed to SOAP Request) to an extension using "ToObject()", but using this it seems that I am loosing properties of all the fields; using reflection I am able to eg. iterate through fields (the structures have to be generic as I have 50+ different objects/requests), but I cannot access the metadata (properties) of that fields that I am settings in outsystems - like "Default Value" or "Send Default Value".

I know that my description might to be a little chaotic, but I am new to Outsystems and I don't know how to properly call some things in here :)

So I want to pass generic objects (Strucutres) to the extension, iterate through fields (in Outsystems called Structure attributes - I can do it with reflection), but I also need to access somehow the Outsystems properties of that fields.

Can it be done?

If they can't be found by inspecting them, I doubt it can be done, though there must be some meta data in there, otherwise (I assume) the Platform itself wouldn't know whether e.g. "Send Default Value" is set. But at lease the "Default Value" only seems known at compile time (see e.g. the structure creation in Records.cs, it sets the default values hard coded).