Calling BAQ using Code - Assembly reference error

Hi All,

I am new to Epicor customizations and I am trying to call a BAQ using a code. (Used this link as reference - Calling BAQ from Code Epicor ERP 10 - YouTube )

I have a BAQ that generates the next number in the sequence and I am using that as Key on one of the forms.

I have taken a couple of pictures to show the errors I see. Any help would be appreciated.


Did you put the using statement at the top?

Did you mean the line #66? or #63?

no, at the top, you should have a bunch of using statements. You’ll have to add one for the dynamic query stuff. The wizard might do that for you, but check.

image

Also, since you aren’t passing in any BAQ parameters, that might be what’s messing you up.

You don’t need like 68 or 69, and change the call in 70 to remove the second parameter (qeds). This will just run the BAQ wide open.

I am using the statements.
pic3

When I add the BAQ parameter:

When I remove lines 68 and 69:

Thank you for taking time to look into this.

The way I read I am not supposed to use ‘OTrans’ and ‘TxtParam’ in this case. Not sure though.

@nvelamakuri Sometimes the oTrans needs to be this.oTrans. You have to mimic how Epicor started the customization. Look at the wizard added lines below the usings and if they all are using the this. structure then you will likely also need to do it that way.

The b in ExecuteByID needs to be capital.