Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Copper Contributor
Posts: 22
Registered: ‎08-17-2009

Can't use unbound lookup controls in code?

I've read elsewhere that you can use unbound controls in Business Rules and Events, but I'm trying to use this code with a button on the form:


Sage.Entity.Interfaces.IAccountSamples thissample =
 this.BindingSource.Current as Sage.Entity.Interfaces.IAccountSamples;


string lueValue = lueRequested_User.LookupResultValue.ToString();
txtRequested_User.Text = txtRequested_User.Text + ", " + lueValue;


lueRequested_User is an unbound lookup control and I select a value from it and then press the button and I keep getting an error because lueRequested_User.LookupResultValue.ToString() or lueRequested_User.Text is NULL?


TIA for any hints.


Mike Fortier

BrainSell Technologies.

Tuned Listener
Posts: 26
Registered: ‎06-28-2010

Re: Can't use unbound lookup controls in code?

Where are you accessing this? If it is on the form load and it is not bound then it will always be null because there will never be any information in it. Else where I am not sure but I don't think that you would be able to use an unbound field. You could try and create a custom field and then bind the data to that custom field. From there you would be able to access it in a business rule.


Hope this is helpful. Good Luck,