So strange I don't even know what to call this one!

I set a global right at the beginning of my method:

globals.gCitemno = utils.stringTrim(citemno)

That ‘first’ method triggered by an onAction triggers a second method where I set the exact same global (yes, strange but I do it if I use the second method without the first on some onActions):

globals.gCitemno = utils.stringTrim(citemno)

This has been running for over a year!

Now I get this error:

ReferenceError: “citemno” is not defined: (SearchBookedQuantity, Line 4)

I have used recordselect to replace the column name in the utils.stringTrim.

I have copied the code from the first method to the second and tried using it.

When I copy the code from the first to the second method and use it I get the exact same error.

Both methods execute on the exact same table!

Explain that one to me!