Adding Custom Controls to Application Architect in SalesLogix 7.5.2

I just came across some new info that has been added to SalesLogix 7.5.2 (currently in beta). The ability to add custom controls to Application Architect for use on QuickForms. This is a completely welcome and awesome addition to the SalesLogix Application Architect. The following is taken from the 7.5.2 AA help files:

Note: The following applies to 7.5.2 and higher only

Creating Custom Controls for Quick Forms

You can create custom controls and use them in Application Architect Quick
Forms.

To create

  1. Create a new Visual Studio project with the class
    library template.

  2. Add project references to Sage.Platform,
    Sage.Platform.Application, and Sage.Platform.QuickForms.

  3. Create a class that derives from
    QuickFormsControlBase or any control you want to extend. 

    Location of classes mentioned is:
    Sage.Platform.QuickForms.Controls.QuickFormsControlBase and
    Sage.Platform.QuickForms.Controls.QFTextBox.

    Following is a code shell for extending a TextBox control:

    using Sage.Platform.QuickForms.Controls;
    namespace
    CustomQuickFormControls
    {
        [BindableProperty(RenderPlatform.Web, “Text”,
    true)]
        public class CustomTextBox : QuickFormsControlBase,
    ICustomTextBox
        {
            public string MyProperty { get; set; }

            public bool
    IsRight { get; set; }
            public string Text { get; set; }
        }
    }

  4. Add the properties to collect the information
    needed to generate the markup for your custom ASP.NET control.

  5. Enable code snippet actions to refer to the custom
    control by wrapping it with an adapter.

    1. Create an interface that represents the control,
      for example, ICustomTextBox.

    2. Implement the interface in the custom quick form
      control class.

    3. Create a control adapter that implements the
      interface.

    The adapter will have a reference to the underlying
    control and acts as a wrapper for it.

    1. Copy the assembly containing the adapter into the
      website bin in the active model, for example,
      ModelPortalSlxClientSupportFilesBin.

    See the Sage.SalesLogix.Web.controls.Adapters namespace (in
    Sage.SalesLogix.Web.Controls.dll) for examples.

  6. Copy the assembly containing the control class into
    the same location as SageAppArchitect.exe, for example, C:Program
    FilesSalesLogix.

  7. Add the assembly name to the
    QuickFormsConfiguration.xml file in order to add it to the list of controls in
    Application Architect. 

    • Add a <string> node for the dll containing the new
      control class to the <ControlAssemblyRegistryserialized> node.

    • Application Architect creates the XML file the first time it
      opens after installation. It places it in
      C:ProgramDataSagePlatformConfigurationApplicationSalesLogix (Vista) or
      C:Documents and SettingsAll UsersApplication
      DataSagePlatformConfigurationApplicationSalesLogix (Windows
      2008).

  8. Create an NVelocity template for rendering your
    custom control and put it in your active model at ModelQuickFormsWeb. See
    other templates in this folder for examples.

  9. Add a <WebControlRenderingProvider> node to
    the Web.ControlConfiguration.xml file.

    • Locate the xml file in the model, ModelQuickFormsWeb.

    • The node provides the information needed by the control
      rendering engine. Follow examples in the file.

    • Reference the NVelocity template you created.

    • Provide a PropertyMaps property for any quick form properties
      with names that differ from their corresponding properties in the rendered
      control. For example, the quick form control property, Style Scheme, is mapped
      to the web control property of CssClass.

    The generator uses PropertyMaps when generating data
    binding code.

Cool indeed. No doubt that I will be covering more on this topic in the very near future.

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

1 Comment

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) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!