Article Details
| Id: | 13164 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 2.03.01 |
| Opened: | 28/07/2015 |
| Closed: | 29/07/2015 |
| Released: | 07/08/2015 |
| Job: | J015991 |
Scripts; Shared (Static) version of finPOWER Connect business layer now available for use in private Classes
Private classes within finPOWER Connect Scripts are unable to use the finPOWER Connect business layer (finBL).
A new Shared (or Static in C#) version of the business layer (and the ScriptInfo object) are now available, e.g.:
Option Explicit OnOption Strict OnPublic Function Main(parameters As ISKeyValueList) As BooleanDim t As Test' Assume SuccessMain = Truet = New Test()t.ShowVersion()End FunctionPrivate Class TestSub ShowVersion()finBLShared.DebugPrint("Version: " & finBLShared.Version)End SubEnd Class
A C# version of the above is shown below:
public bool Main(ISKeyValueList parameters){bool Main;Test t;// Assume SuccessMain = true;t = new Test();t.ShowVersion();// Function should return a Boolean value indicating successreturn Main;}private class Test{public void ShowVersion(){finBLShared.DebugPrint("Version: " + finBLShared.Version);}}
NOTE: Page Sets and Account Application Type Scripts can also access a finBLShared property however, since these inherit from a standard base class, ScriptInfoShared is not available to these Scripts.