Forked from EliJDonahue/araslabs_ShowMyGraph.js
Last active
November 5, 2019 19:32
-
-
Save cgillis-aras/499297dc1928e07972018f9315f00083 to your computer and use it in GitHub Desktop.
Sample method code for opening a specific graph view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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