Opening Unbound Dialog and Passing Information in SalesLogix

Question: I would like to open an unbound dialog in SalesLogix, and pass information to the dialog.  How can I do this?

Answer:  First add parameters before the call to ShowDialog(), an example:

DialogService.DialogParameters.Clear();

DialogService.DialogParameters.Add("MyParameter", MyVariable.ToString());
DialogService.SetSpecs(0, 0, 400, 400, "MyDialog", "My Dialog", true);
DialogService.ShowDialog();

Next, retrieve the parameters in the load action of the dialog:

object o = null;
DialogService.DialogParameters.TryGetValue("MyParameter", out o);
if (o != null)
{
    string myVariable = o.ToString();
}

If the parameter is found, the call to TryGetValue will return true, false if it isn’t found.  It is possible to change behavior based on if a parameter is present:

object o = null;
if (DialogService.DialogParameters.TryGetValue("MyParameter", out o))
{
    // Parameter is present, do something
    string myVariable = o.ToString();
}
else
{
    // Parameter not present - do something else
}

6 Comments

  1. Hi,
    Thanks for your article but can i pass parameter to parent form. As I need some information from dialog. Appreciate your help.

    Reply
  2. Hi ryan,

    Thanks for ur previous suggestion.
    i want to call my formload event when the dialog popup close on the page, its working on the InsertAccount and AccountDetails but same is not working on Insert Lead, lead Detail contacts…
    please suggest how to proceed.

    Reply
    • Set the LoadAction’s “Repaint Event” property to true

Leave a Reply to Harminder Singh Cancel reply

Your email address will not be published.

Subscribe To Our Newsletter

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

You have Successfully Subscribed!