Getting reference via client

0
Hi all, I’ve been attempting multiple methods to obtain the references of an object via a javascript action but haven’t had much luck so far. My use case is as follows: I’ve passed into the javascript action the AVV object and from this I would like to get a list of FixedAssets associated with that object.  I’ve attempted the following so far:    const fixedAssets = mx.data.get({         guid: aVV.getGuid(),         callback: function(avv) {             console.info("Using get")             console.info(avv.get('FixedAsset_Avv')); // works! to prove that I am getting the object               console.info("Using getChildren")             var testChildren = avv.getChildren("OneERP.FixedAsset_Avv");             console.info(testChildren.length) // results == 0               console.info("Using getReferences")             var testRef = avv.getReferences("OneERP.FixedAsset_Avv");             console.info(testRef.length); // result == 0               console.info("Using fetch");             var testFetch = avv.fetch("OneERP.FixedAsset_Avv", function(teFe) {console.info(teFe)})             console.info(testFetch); // result == 0         }     }) Additionally, I have attempted going through via the XPath method which got me all FixedAsset objects in the database but I’m finding the documentation here (Mendix 9 Client Documentation: Namespace: data) not very easy to understand. This forum post (Mendix Forum - Questions (mendixcloud.com)) hints at how to use the reference filter but I’m still not sure how to use the aVV as a reference. (note: aVV is passed in as a parameter, avv is the result of the callback in the previous attempts).      const test = mx.data.get({         xpath: "//OneERP.FixedAsset",         filter: {             references: {"OneERP.FixedAsset_Avv": {aVV}}         },         callback: function(objs) {             console.info(objs.length);         }     }); Any help would be much appreciated. Btw, it’s not shown here but the two objects are located in 2 different modules. AVV in Main and FixedAsset in OneERP.  Thanks, Andrew  
asked
0 answers