HI
Here is the documentation with example provided by mendix: https://docs.mendix.com/howto/extensibility/write-javascript-github
You can pass any entity you want through input param to javascript. You can access attributes by set/get functions. example
mxObject.get(attr);
mxObject.set(attr,attrValue);
Use this documentation to get information from mendix entity with different xpaths and filters: Mendix 8 Client Documentation: Namespace: data
example:
mx.data.get(
{ xpath: "//System.User", filter: { sort: [["Name", "asc"]], offset: 0, amount: 10 }, callback: function(objs) { console.log("Received " + objs.length + " MxObjects"); } });
for xpath you can provide any xpaths you can think of and use in retrieve activity .
How to write xpath you can find here: XPath | Mendix Documentation
Regards,
Anahit