Get Query Execution Parameters By ID no longer working, but not erroring either

(In my code, I do not have spaces but the title would not let me use GetQueryExecutionParametersByID as it said it was too long to be in the title.)

In numerous customizations, I use BAQs. Today, in one of my customizations, it just quit working. (I know, I never believe that when peopel say it either)

	DynamicQueryAdapter dqadptr = new DynamicQueryAdapter(oTrans);
		MessageBox.Show("1");
		dqadptr.BOConnect();
		MessageBox.Show("2");
		QueryExecutionDataSet qeds2 = dqadptr.GetQueryExecutionParametersByID("tedUntrainedWork3");
		MessageBox.Show("2.5");

It’s not erroring, just not doing anything so I added the message boxes. It never gets passed the QueryExecutionDataSet line. Prints the 2, not the 2.5

I’ve tried both that and with Ice.BO in front and the same results for both.
This code was working, and in other forms, it is still working. I copied code from a working one and dumped it in here, but same result. I compared the Assembly Reference Manager, and I have the same custom ones added:
image

Is there something I’m missing or that might cause this?

Is this 10.1.500.46 version?

I’m sorry, I need to update that. We’re still knee deep in trying to get everything to work in the new version (been working through our upgrade since May) so I hadn’t changed it yet. We are on 2023.1.4

add try/catch block and put the message inside catch to know the error. Or go to REST Help and call that method from there to see if it work on the server side.

I’ve always used Try/Catch to suppress an error message and do my own thing. How do I force it to show the error message in the catch?

And I’m sorry, but I’m not familiar with using the REST help at all. If you can point me towards a resource explaining what to do, I’ll do that straight away.

MessageBox.Show(ex.Message) ?

That won’t compile.

Error: CS0103 - line 86 (244) - The name ‘ex’ does not exist in the current context

is there a using or reference that I need to use that?

try
{
                DynamicQueryAdapter dqadptr = new DynamicQueryAdapter(oTrans);
		MessageBox.Show("1");
		dqadptr.BOConnect();
		MessageBox.Show("2");
		QueryExecutionDataSet qeds2 = dqadptr.GetQueryExecutionParametersByID("tedUntrainedWork3");
		MessageBox.Show("2.5");
} 
catch(Exception ex)
{
 // exception is not for hide, it is for problem solving
  MessageBox.Show(ex);
}

Copied and pasted your code and still not compiling.

Sorry, I added a .ToString to the ex and now have something to work with. Thank you. Now to see if I can figure out the issue.


Not sure why I’m getting an index out of range on that snippet of code.

Do you have BPM on thar method?

On GetQueryExecutionParametersByID? No.
image

Separately, did the BAQ get unshared? :person_shrugging:

I don’t remember specifically if it’s this call or not, but there are some methods that spit out an exception for no good reason, and does the work anyways. We’ve had to wrap some code in a try catch to allow it to continue. If you finish the rest of the code, does it work?

A little background might go a long way.
This is a Dashboard that I have added tabs to.
On the main query for the dashboard I am publishing the start and end date parameters for that one to BPM variables and then when those change, I’m using that to fire a method within the customization which runs two other queries and puts the results on the tabs I added.

Nope, checked that first as I assumed that was the issue. (that it might have become unshared)

And you have data in whatever you are publishing things from?

Do you have visual studio installed so that you can run in debug mode?

Sowhat that EmpGridCheck does? Looks like it does not expect that dataset maybe changed after server call to that method and does not contain data it relies on.

I have data in the dashboard I am publishing from as I set these variables from it in the beginning and I can MessageBox those variables, and the correct info displays in them.

I can’t finish the rest of the code either, because it is erroring on defining the QueryExecutionDataSet. If I wrap that in a try / catch, it’s undefined outside of the try / catch. If I put the other code to set the parameters within the try / catch, it doesn’t run because the “error” in the try / catch when it defines the dataset then causes it to jump to the catch statement skipping the rest of the rows.