Using DynamicQueryAdapter to access a BAQ in a dashboard

I am trying to add some code to a dashboard tracker pain and can’t find the correct syntax for using DynamicQueryAdapter

I get an error in the deployed dashboard when the execution hits BOConnect();
I assume this is because the reference passed to create the DynamicQueryAdapter is wrong

DynamicQueryAdapter dq = new DynamicQueryAdapter(this.oTrans);

doesnt work and attempts to reference the tracker pain have so far failed.

What is the correct construct I should use?

PS. I used the wrong ‘pain’ deliberately

Try MainController (from memory) instead of this.oTrans.

I am one of those irregular developers stumbling through the idiosyncratic world of Epicor customisation.

I will give that a try. Thanks.

I have wondered since posting this message i should deploy the dashboard and then customise it as an alternate to way to get at the object model.

Deploying then customization does give you an oTrans to work with. We have done that on a few dashboards.

@josecgomez has a video on how to add a dynamic query in code.

And yes, you will need to deploy your dashboard before doing this.

1 Like