12-23-2022, 11:09 AM
-> In the parent dashboard:
sdk.setContext('parm', changedItem.attributes._id );
var customer =sdk.getContext( 'parm' );
//alert(customer);
var a=sdk.getContext('dashboard_user').apiToken;
var b=window.location.origin;
var c="/home/#/opendocument?docid=544669703&doctype=2&token=";
var v3=b+c+a+ '&id=' +customer;
//alert(v3);
window.open(v3,'_blank')
Fetch the data in child dashboard
var v3=parent.window.location.href;
//alert(v3);
function getParam( name, url )
{
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
}
var ap=getParam('id',v3);
//alert(ap);
sdk.setContext('pass', ap);
sdk.setContext('parm', changedItem.attributes._id );
var customer =sdk.getContext( 'parm' );
//alert(customer);
var a=sdk.getContext('dashboard_user').apiToken;
var b=window.location.origin;
var c="/home/#/opendocument?docid=544669703&doctype=2&token=";
var v3=b+c+a+ '&id=' +customer;
//alert(v3);
window.open(v3,'_blank')
Fetch the data in child dashboard
var v3=parent.window.location.href;
//alert(v3);
function getParam( name, url )
{
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
}
var ap=getParam('id',v3);
//alert(ap);
sdk.setContext('pass', ap);