What does oTrans do?

DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);

What does the (oTrans) pass in here?

What do you mean what does it pass? oTrans is the instance of the current EpiTransaction

I am just wondering what that part of the code is doing.

I see it here as well. Me just being curious and wanting to be able to read the lines better. The video on YouTube helped me fix an issue, but I want to know what it does as well.
EpiDataView edvPODetail = ((EpiDataView)(this.oTrans.EpiDataViews[“PODetail”]));

1 Like

It carries all sorts of objects related to the adapters for the screen, session info, customization interface, all sorts of stuff are wrapped in there.

That line of code is instantiating a new instance of the DynamicQueryAdapter class, in it’s constructor the DynamicQueryAdapter class requires an instance of EpiTransaction be passed in in order to use it’s session and call context.

This line of code is looking at the EpiDataView collection held in oTrans (the current EpiTransaction) and getting the instance of EpiDataView with a key of PODetail.

Have a look at “Transaction” in the custom object explorer
image

2 Likes

Thank you all.