Skip to content

Instantly share code, notes, and snippets.

@cgillis-aras
Forked from EliJDonahue/araslabs_ShowMyGraph.js
Last active November 5, 2019 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgillis-aras/499297dc1928e07972018f9315f00083 to your computer and use it in GitHub Desktop.
Save cgillis-aras/499297dc1928e07972018f9315f00083 to your computer and use it in GitHub Desktop.
Sample method code for opening a specific graph view
// For 11.0 SP15
return ModulesManager.using(
['aras.innovator.GraphView/GraphWindowView',
'aras.innovator.core.ItemWindow/DefaultItemWindowCreator'
]).then(function (View, Creator) {
require(['GraphView/Scripts/GraphDataLoader'], function (GraphDataLoader) {
inArgs = {
// Specify the ID of the GVD to be used
gvdId: 'F04DC7C054CA48DA886A0B336BD61E37'
};
var view = new View(inDom, inArgs);
var creator = new Creator(view);
creator.SetWindowId(inDom.getAttribute('id') + inArgs.gvdId);
return creator.ShowView();
});
});
// For 12.0
return ModulesManager.using(
['aras.innovator.GraphView/GraphWindowView',
'aras.innovator.core.ItemWindow/DefaultItemWindowCreator'
], function (View, Creator) {
require(['GraphView/Scripts/GraphDataLoader'], function (GraphDataLoader) {
inArgs = {
// Specify the ID of the GVD to be used
gvdId: 'F04DC7C054CA48DA886A0B336BD61E37'
};
var view = new View(inDom, inArgs);
var creator = new Creator(view);
creator.SetWindowId(inDom.getAttribute('id') + inArgs.gvdId);
return creator.ShowView();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment