One the many great things about the Cireson Analyst Portal for Microsoft Service Manager is the ability to apply your own customizations. Whether you are doing it yourself or working our Consulting Team, there are so best practices to follow to ensure long term success.
To start, the CustomSpace folder is THE place for customizations to live. This folder is protected from changes made by Portal updates. You can make changes that affect tasks (using custom.js) or styles (using custom.css) as well as manage templates and additional files.
With great customization comes great responsibility
With anything that can be tweaked, it is important to know why you want it and the cost/benefit of having it. That cool little counter button on a form could be adding to the loading time of a page or returning more data than you ever intended to use. It is also important to check that yesterday’s cool customization hasn’t become part of today’s new feature. Portal updates cannot guarantee every customization will continue to work, so a little management goes a long way! The key is to test, test and test again – with scenarios, users and under load or scale. When the customizations are organized properly, adding, removing and managing them is much easier.
Using a Script Loader – your customization friend
If you were only ever going to use a couple of lines of code to fire off a customization, sticking it directly into the custom.js file in CustomSpace would be enough – job done. But that is rarely the case nowadays as we constantly look for ways to make things better in the Portal. Rather than stuffing multiple bits of custom code into the custom.js file, create a folder for each customization. Any files related to the customization are now in one place. Add that readme file so your team knows what the customization does!
In my example, I have a folder for the customization (ReorderHomepage) that contains the .js code to run. This customization and what it does is documented in a Cireson Community post you can find here.
To run your fully tested code, we use a Script Loader function that requires two inputs; the path to the .js file and the URL page it will be applied to. This function is added to the custom.js file, becoming the launching point for your customizations. The code checks whether the appropriate URL is loaded and then runs the .js script in the provided path. There’s even a line that writes to the console log to let you know what customization was loaded.
There are many ways to implement a script loading feature like this. Whichever method you use, it is well worth the extra overhead and time saved in troubleshooting.
The ability to add your own flair or functionality to the Cireson Portal for SCSM is a great benefit. Making customizations manageable means you can do more of them. Take the time to understand the code, organize your scripts and make it work!