-1

How I can access objects of DAC and BLC?

class BaseDACExtension : PXCacheExtension<BaseDAC>
{
    public void SomeMethod()
    {
        BaseDAC dac = Base;
    }
}
  • DAC extensions shouldn't contain method definition. I recommend you read T100 training material to get a basic understanding of how to work with Acumatica Framework: http://acumaticaopenuniversity.com/courses/development/t100-introduction-to-acumatica-framework/ – Hugues Beauséjour Jul 13 '17 at 17:39

1 Answers1

0

Assuming I understand your question correctly, just call GetExtension on either your base DAC or base Graph...

For DAC extensions: (where baseDac is an instance of BaseDac)

var dacExt = baseDac.GetExtension<BaseDACExtension>();

For Graph extensions: (where baseGraph is an instance of BaseGraph)

var graphExt = baseGraph.GetExtension<BaseGraphExtension>();
Brendan
  • 5,428
  • 2
  • 17
  • 33
  • but i want object of blc in dac extensible –  Jul 13 '17 at 17:43
  • that sounds backwards. The BLC extension should use the DAC extension and its not typical to have methods/logic in a DAC. The logic should be in the BLC. – Brendan Jul 13 '17 at 17:50
  • nothing will stop you from just passing in the graph to a method on the DAC via a parameter. It's just not normal or not recommended. – Brendan Jul 13 '17 at 18:16