B
bshea
I have a form being built where I want to test for a field value and then
ensure the form's view is set correctly based on that value.
pseudo-code:
OnLoad()
{
check for status_field value
If (status_field value == "new") XDocument.View.SwitchView("Request");
.... more tests etc.
Problem:
When this occurs in the OnLoad function the view object is returning null
and then I can't test views, set views, etc.
Attempting to manually create a view object reference fails, with the same
result (obj doesn't exist or is null) but just on differentlines of code.
Any thoughts on how I can get the view to set correctly based on the field
value?
ensure the form's view is set correctly based on that value.
pseudo-code:
OnLoad()
{
check for status_field value
If (status_field value == "new") XDocument.View.SwitchView("Request");
.... more tests etc.
Problem:
When this occurs in the OnLoad function the view object is returning null
and then I can't test views, set views, etc.
Attempting to manually create a view object reference fails, with the same
result (obj doesn't exist or is null) but just on differentlines of code.
Any thoughts on how I can get the view to set correctly based on the field
value?