Jo Div
Jo Div

Reputation: 13

PXGraphExtension CreateInstance method?

How to create an instance of a graph extension something like:

MyGraph_Extension graph = PXGraphExtension.CreateInstance<MyGraph_Extension>();

Upvotes: 1

Views: 946

Answers (1)

Brendan
Brendan

Reputation: 5613

You do not create an instance for an extension graph the same way as the base graph. You use the instance of the base graph and just get your extension graph using GetExtension. Here is an example which is an extension for Sales order entry:

var baseGraph = PXGraph.CreateInstance<SOOrderEntry>();
var extGraph = baseGraph.GetExtension<SOOrderEntryExtension>();

Upvotes: 4

Related Questions