Question: I am trying to dynamically hide / show a panel on a form in the onload event of my form in SalesLogix. I have added the panel to the form, and added a couple of fields in the panel, but when trying to reference the panel with the following code snippet:
form.pnlArchitect.Visible = False
I receive this runtime error:
Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Line 49: form.dtPresentation.Caption = “”
Line 51: form.pnlArchitect.Visible = False
How can I fix this?
Answer: If you are using the C# Snippet (deprecated), you do not need the form. precursor.
Just use dtPresention.Caption.