Customization Error: CS0234

image

I keep getting the error shown in the pic above. This is a customization, on a custom dashboard. I am calling the dashboard from the engineering workbench via context menu. The end goal is to get the ECO group ID via custom code. I know for a fact that the value IS being sent, as I can get it via GUI options, but that has other unrelated issues which is why I’m trying to do everything through code now. The pic below shows the code I have setup so far.

image

And here is the usings / references

image

Any ideas on this? Thanks all!

Get rid of all the stuff before LaunchFormOptions. You don’t need that part. For example: LaunchFormOptions lfo = new LaunchFormOptions();

You have a few things here. Try changing to this:

string jn = WBTest2.LaunchFormOptions.ValueIn.ToString();
MessageBox.Show(jn);

However, You need some error checking too:

if (WBTest2.LaunchFormOptions != null && WBTest2.LaunchFormOptions.ValueIn != null)
{
	MessageBox.Show(WBTest2.LaunchFormOptions.ValueIn.ToString());
}

I think on a dashboard you can call

YourDash.LaunchOptions

But as Jason mentioned, watch out for nulls.

@Jason_Woods I tried using the top bit of the code you provided just for troubleshooting purposes, I will definitely do error checking before we go live. Using the exact code you provided gives this error:

If I use the Ice.UI.App however in front of the WBTest2, I get the following:

Any tips on how I should proceed forward? Thanks!

@MLamkin I’m not exactly following what to do here. I don’t have the mentioned code anywhere on my dashboard.

Could you please elaborate a bit on that?


You have LaunchFormOptions there. Remove the Ice.UI.App.WBTest2. part, try using WBTest2Form. instead.

string s = (string)BAQReportForm.LaunchFormOptions.ValueIn; for a customization of the BAQReport for example.

Are you adding this code to an assembly or runtime dashboard? If this is a runtime dashboard, then deploy it and use the assembly instead.

Jason Woods
http://LinkedIn.com/in/jasoncwoods

1 Like

Okay for future reference for anyone else that might run into a problem like this, I was using the wrong name. I had to use the name under the form properties, which in my case was MainController, as seen in the pic below.

Big thank you to everyone who jumped in to help!