Get association in JavaScript action

0
Hi together, I am currently working on a project which is based around a custom widget which receives a JSON structure as input. The JSON structure is build up in a Nanoflow, by a JavaScript action. The domain model currently contains a main entity which has associations to another entity. In the JavaScript action I can get the attributes of the main entity, but when I try to access the values of the associated entity, I just get an ID. So how can I access the values of an associated entity, from the main entity, in a JavaScript action? Thanks in advance!
asked
1 answers
0

Hi Konstatine,

Can you create the JSON structure with a microflow? This will allow you use export mappings. 

If you want to fetch thing over association you do a get with the associated guid, with action or get

https://apidocs.rnd.mendix.com/8/client/mx.data.html

Or retrieve it directly

https://apidocs.rnd.mendix.com/8/client/mendix_lib_MxObject.html#fetch

Cheers,

Andries

answered