how to get data from domain model inside javascript snippet ?

0
hi team , how i can retrieve data from  below three entities inside the javascript snippet ?      this is my javascript snippet -    and i have already placed this widget inside the data view like this now i want to retrieve data from the above 3entites inside my javascript snippet . how i can do ? - 
asked
1 answers
0

You need to use the Mendix JavaScript Client API to do this. Have a look at the mx.data.get method.

 

For example, to get all the System.User objects, you can use the following...

mx.data.get({
    xpath: "//System.User",
    callback: function(objs) {
        console.log("Received " + objs.length + " MxObjects");
    }
});

 

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

 

I hope this helps. Good luck!

answered