Get Current Object GUID using client APIs

suppose that we have a page that contains data view for single object, is there is a way to get this object GUID if the page opened using client API’s ?
1 answers

if a page is waiting for an object you need to send it. 

But it may be more easy to do the logic on the page itself, using a data source microflow that is retrieving the object. 

If you can't do that, then yes you need to retrieve the correct guid of the object that you want. 

take a look at the doc in the mx data part here :

there is probably different way to do it but what I already did in the past is to use a microflow that retrieve the object that I want, you can then use the that object to open your page. 


here is an example :{
    params: {
        applyto: "none",
        actionname: "MyFirstModule.JS_Retrieve_Object_Microflow"
    origin: this.mxform,
    callback: function(obj) {;
    error: function(error) {