11/25/2024 5:22:43 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
| |
|
Re: [7.5.4 Web] Possible to add custom deployment steps?
Posted: 12 Jan 18 11:44 AM
|
Yes. You'll need to create a custom deployment action provider and wire it up the the portal. I actually have an article on this topic that I believe is queued to publish in Feb. It will outline the complete steps, but for now, you can do the following:
- Create a new Class Library project in VS, set the 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
- Implementing the interface in step #5 will give you an "AfterDeployment" that will be invoked after the deployment completes, you can add your custom code here to do whjat you're after
- For the GetDeployableItems method, you can just add "return new IShadowCopyItem[0];"
- 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
- Add your new assebmbly to the list
- Deploy and your code will execute
Hope this gets you started.
Ryan |
|
|
| |
|
Re: [7.5.4 Web] Possible to add custom deployment steps?
Posted: 15 Jan 18 7:17 AM
|
Thanks, Ryan. I'll give it a shot. I only wonder:
since SLX 7.5.4 runs on .Net Framework 3.5, shouldn't I set the framework version to .Net 3.5 in the first step?
Also, in the sample project, you added a reference to Sage.Platform, too (so this should be step 7, then?). And then there're objects of type "PortalBase" in the signature of your implementation of some of the interface's methods, when they should be of type "PortalApplication".
Edit: I replaced all "PortalBase" references with "PortalApplication" and added code to the method "AfterDeployment". When building the solution, I get the following error:
- ... does not implement interface member '...AfterDeployment(PortalApplication, BackgroundWorker)' (you added "object deployment" to the signature?)
How can I resolve this issue? |
|
|
|
Re: [7.5.4 Web] Possible to add custom deployment steps?
Posted: 15 Jan 18 10:31 AM
|
Sorry, yeah, for 7.5.4 you'll need .NET 3.5 (I coped those steps from my article that is referencing SLX 8.3). Also, the signatures are different in SLX 8.3 than 7.5.4. The correct way for this to look for 7.5.4 is as follows:
using System; using System.ComponentModel; using System.DirectoryServices; using Sage.Platform.Application; using Sage.Platform.WebPortal.Design;
namespace FX.Deployment { public class SampleDeploymentAction : IDeploymentActionProvider { public bool RunOnBackgroundBuilds => true;
public void AfterDeployment(PortalApplication application, BackgroundWorker worker) { }
public void BeforeDeployment(PortalApplication application, BackgroundWorker worker) { }
public IShadowCopyItem[] GetDeployableItems(PortalApplication portal, BackgroundWorker worker) { return new IShadowCopyItem[0]; }
public void SetupDeployment(DirectoryEntry virtualDirectory, PortalApplication application, BackgroundWorker worker) { } } }
https://pastebin.com/cPVEpdws
Also, my sample does add a reference to Sage.Platform.dll, but (at least in 8.3) that's not a requirement of the deployment action provider, but is needed for the other code I added in the sample.
Hope this helps.
Ryan |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|