One of my favorite sessions at the SalesPad Panels 2015 event was about scripting in SalesPad. We have talked before about SalesPad’s flexibility and what you can do with SalesPad scripts but this session was geared towards the people who are writing the scripts and helping us to write them better. And the things SalesPad is doing to make writing scripts better and easier within the software.

In the latest version of SalesPad, which was just released a couple of days ago, they have cool new functionality called Security Script Manager.

Prior to 4.4.1, the way that scripts were held is everything was in security underneath the object where you applied the script. For example, if you needed a sales document pre‑saved script you had to go into security, select the user group that you wanted and then go to sales document entry and your scripts were stored in there. So if you wanted the same script for all of your security groups you had to copy and you paste it into each of the additional user groups. If you go to your security editor and just search on the word “script” it will return dozens of different locations where you can put scripts. Not to mention that there are a couple of places within settings that you can put scripts, like an email on‑load script, for example

Finding Scripts

What the new Security Script Manager does is it gives you an almost one‑stop shop for all of those scripts that have been applied. I do say “almost” because there are some scripts that are not included there. You can write system-wide filter scripts, which are not included in Security Script Manager.

By having all of your scripts in one place it just makes it easier to find everything. Especially from the support side of things when you’re troubleshooting. When you are just trying to figure out what’s going on, one of the first things that you want to check is if there were any newly-created or edited scripts.

Because if there’s a problem that shows up one day, and it wasn’t there the day before, something changed, right?

So one of the most obvious things that you can check out is if there are any scripts applied to whatever window you are on. I usually use the sales document pre‑save as a go‑to example. It’s one of the most common that you can use but the window is pretty straight forward. Down the left‑hand side you see a list of all of the scripts that are saved. Then when you select one the right side populates with the scripts that are there. So you can make changes and save anything you like.

Make Changes to Multiple Groups

They did make saving the changes to multiple groups significantly easier. You don’t actually have to copy and paste it across. You can just use a little check box. They still have the compile button which helps figure out if your script is running successfully or if SalesPad thinks it’s encountering any errors with your script.

Help Button

One of the really great things that SalesPad put into script manager is a help button. So if you speak to anyone who writes scripts, one of the most challenging things is trying to figure out which fields are and are not available within the object that you are working in. When I say “object” I’m talking about the customer card, vendor card, sales document, even sales line items. Those are the objects that you can apply scripts to. And each of them has their own field. Each of the fields are unique. Some of them are named a little bit differently so you have to figure out naming conventions along with which fields are even available to you. Then you’ve got some additional gray area when it comes to linking those different objects together. So obviously sales line items belong to sales documents but in order to put them in a script together you need to call it a particular thing and you need to name it a particular way. That can definitely be a challengs.

So now in the Security Script Manager Salespad has given you this little help box. If you click that help button it opens up a window and tells you all of the fields that are available for the object that you’re on.

At this point it does not include those related objects. So if you’re in a sales document it does not necessarily show you all of the objects that you could access from sales line items or what you can access from the item master, for example. But the developers who were running the meeting at SalesPad Panels definitely said that this is one of their hopes for the future. They probably won’t be able to include everything because the intertwining would just be massive and it would take too long to load that help window. But what they’ve already pulled together goes a long way in helping with that.

Literally yesterday I submitted a SalesPad support ticket asking for a list of fields that go along with one of the objects. Now I find out that in this new version 4.4.1 it’s right there for me to find on my own. Excellent!

Restore Previous Versions

SalesPad is attempting to make scripting more accessible to users. But that power is potentially dangerous too. SalesPad seems to be aware of that because they have also added a new feature for versioning. Every time you “save” it basically adds that save onto the end of a long list. It has a version number and you can flip and toggle through the old versions and see the progression of the script that you’re on. So if you saved it a week ago, it is user, date and time-stamped to show who did that and when and what changes they made. That really helps to troubleshoot any issues. If something goes wrong and you know how to use that versioning toggle, you can go back to the one that actually worked and restore it. Of course, only people with the right security access can do this.

I am looking forward to getting more deeply involved with scripting in SalesPad version 4.4.1 and doing some amazing things with our Dynamics GP clients using SalesPad.

Get more Cavallo SalesPad for Dynamics GP tips

By Katelyn Wood, CAL Business Solutions, Microsoft Dynamics GP for Distribution Partner,

Twitter: @CALERPNews