We have a screen customization with a button that calls an internal URL. I want to set a few query string parameters on the URL based on the company / plant combination.
However I have a problem with my C# trying to set the parameters. They never get changed after I set them. I think it’s a variable scoping thing. I’m a C# noob.
I figured out why it wasn’t working. The company and plant weren’t getting set until the second time I clicked the button so it was a timing issue. I moved some initialization of company and plant to the custom code initialization section of the customization and now the code is behaving as expected.
Popping open message boxes helped.
For anyone in the future. Here’s how I opened a message box inside a screen customization: