How Can I Dynamically Hide/Show a Panel on a Form in SalesLogix?

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.

Source Error:

Line 49: form.dtPresentation.Caption = “”
Line 50:
Line 51: form.pnlArchitect.Visible = False
Line 52:
Line 53:

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.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!