Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to configure parent child dashboard?
#1
-> 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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)