
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
-
Create a new Visual Studio project with the class
library template. -
Add project references to Sage.Platform,
Sage.Platform.Application, and Sage.Platform.QuickForms. -
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; }
}
} -
Add the properties to collect the information
needed to generate the markup for your custom ASP.NET control. -
Enable code snippet actions to refer to the custom
control by wrapping it with an adapter.-
Create an interface that represents the control,
for example, ICustomTextBox. -
Implement the interface in the custom quick form
control class. -
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.-
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. -
-
Copy the assembly containing the control class into
the same location as SageAppArchitect.exe, for example, C:Program
FilesSalesLogix. -
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).
-
-
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. -
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.
Hi Ryan,
I’m working with SLX 8 and tried your tutorial and this one http://codesnap.wordpress.com/2011/07/06/building-a-custom-control-for-saleslogix-web/ .
But none of them works. Do you have an idea why it is not working with SLX 8?