Form Customization Script Error ExecutionParameter.AddExecutionParameterRow

I am trying to add a BAQ to a form which I have done before but I keep getting this error.

Error: CS0103 - line 77 (966) - The name ‘QuoteNum’ does not exist in the current context

for this line

qeds.ExecutionParameter.AddExecutionParameterRow(“QuoteNum”,QuoteNum.txt, “int”,false, Guid.NewGuid(),“A”);

I don’t know how you setup the BAQ, but your parameter names should match the value in quotes. “QuoteNum” in your case. Also, where you have QuoteNum.txt, you may need to setup a link to that control with something like this in the initialize custom code section.:

QuoteNum = (EpiTextBox)csm.GetNativeControlReference("5678fb25-ccec-4ff9-ba79-48c2d550a09e");

Then refer to it as QuoteNum.Text (not QuoteNum.txt).

Good luck!

Thanks Nate. The parameter matches. The part with the .txt is the same format I have used in previous scripts and it worked without issues. I was wondering if its because its an integer instead of a string field that could be causing the issue. Not sure though. I can’t find anything anywhere on the arguments for qeds.ExecutionParameter.AddExecutionParameterRow

I will keep trying. I haven’t done anything with the GetNativeControlReference but I will give it a try.

not positive, but I think it only takes strings

??

What is this?

To be perfectly honest I don’t know. I can’t find anything that tells what all the arguments are for. There is a video out there that shows how to call a BAQ from within a form and thats what I have followed all along. It hasn’t given me issues until this one. I have googled 1 million times and can’t find out what each argument means. I know the first one is the parameter name, the second one I am not sure but in the past scripts it has always been the same name as the parameter with .txt at the end, the third argument can be int, nvchar, etc., the fourth and fifth one I couldn’t find anything on.

I figured it out. I didn’t have the box my parameter went it correct.

1 Like