
Something that is nice about the Application Architect is that it is customizable in a similar way to how you customize the Infor CRM web client itself. An example of this is in my Git Extensions for Application Architect project. One useful place that you can extend with your own code is the deployment process. You can create your own deployment action provider to add files to the deployment files for a portal, or execute code before or after the deployment process. There’s a lot of useful possibilities with extending the deployment process. This article will outline the complete steps to create a custom deployment action provider and wire it up to the deployment process in Application Architect.
In a nutshell, a custom deployment action provider is a DLL that implements the IDeploymentActionProvider interface found in the Sage.Platform.WebPortal.Design.dll. You then add this DLL to a portal (or multiple portals) and when the portal is deployed it will run the code in the custom action provider DLL.
The complete steps are as follows:
- Create a new Class Library project in Visual Studio. Set the .NET framework version to .NET 4.5.2.
- Add a reference to Sage.Platform.WebPortal.Design.dll in C:\Program Files (x86)\Saleslogix\Platform
- Add a reference to Sage.Platform.Deployment.dll in C:\Program Files (x86)\Saleslogix\Platform
- Add a reference to Sage.Platform.Projects.dll in C:\Program Files (x86)\Saleslogix\Platform
- Add a reference to Sage.Platform.Application.dll in C:\Program Files (x86)\Saleslogix\Platform
- Add a new class to your project that implements the interface Sage.Platform.WebPortal.Design.IDeploymentActionProvider
- For the GetDeployableItems method, you can just add return new IShadowCopyItem[0]; if you don’t want to deploy any new files – See complete code below in this article.
- Copy the assembly to C:\Program Files (x86)\Saleslogix\Platform
- Restart Application Architect
- In Application Architect, expand the Portal Manager and the select the portal you want to add this to, such as the SlxClient portal
- In the Properties grid with the SlxClient portal selected, you’ll see a property for DeploymentActionTypes. Click that to bring up the editor
(click the image for a larger view) - Add your new assebmbly to the list
(click the image for a larger view) - Deploy and your code will execute
Inside the custom deployment action provider DLL you can get a reference to the deployment directory path, or a connection string to the current Saleslogix database.
To get a connection to the current Saleslogix database, you will get a reference to the DataService, just like you would in the Infor CRM web client:
var dataService = ApplicationContext.Current.Services.Get<IDataService>(); var connectionString = dataService.GetConnectionString();
To get a reference to the deployment directory, you will need to get a reference to the deployment targets for the deployment and then find the target that includes the portal your custom action has been added to, like this:
// "deployment" is provided to you as an argument as object // "application" is provided to you as an argument as Sage.Platform.WebPortal.Design.PortalBase foreach (var target in (deployment as Sage.Platform.Deployment.Deployment).Targets.Where(x => x.IsActive)) { // locate the matching portal for this target var targetPortal = target.Portals.FirstOrDefault(x => x.PortalApp.PortalAlias == application.PortalAlias); if (targetPortal == null) continue; // Get the deployment directory var deployFolder = target.GetFolderName(targetPortal); }
I have created a complete working sample on Github. This sample project contains a complete implementation of a custom deployment action provider. It creates a file stream which is deployed with the portal files and also implements the After Deployment step to retrieve the deployment path and connection string (and also writes to the output window). Feel free to take a look.
![]() |
SampleDeploymentAction from Customer FX |
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!