Article Details
Id:10305
Product:finPOWER Connect
Type:NEW
Version:1.06.00
Opened:10/07/2012
Closed:12/07/2012
Released:01/08/2012
Job: J009984

Wizard Validator Scripts can now use parameters defined in an Application Shortcut

When a wizard, e.g., the Account Payment wizard is opened via an Application Shortcut, the Wizard Validator Script can now access any ad-hoc parameters passed when opening the wizard form.

The following wizards now support this functionality:

  • Account Payment
  • Account Payment Arrangement
  • Account Payment Promise

An example Summary Page Script to open the Account Payment wizard with a custom parameter (TransType) is shown below:

Public Function Main(ByVal source As Object, _
                     ByVal target As iseSummaryPageTarget, _
                     ByVal formRecordMode As iseFormRecordMode, _
                     ByVal contextData1 As Object, _
                     ByVal contextData2 As Object, _
                     ByRef text As String) As Boolean

  ' Assume Success
  Main = True

  text = "<a href='app://FormShow?form=AccountPayment&id=L10000&TransType=PAY2'>Test</a>"

End Function

An example of an Account Payment Wizard Validator Script using the custom 'TransType' parameter is shown below:

Public Function Main(ByVal userInterface As ISUserInterfaceBL, _
                     ByVal reports As ISfinReports, _
                     ByVal eventId As String, _
                     ByVal targetObject1 As Object, _
                     ByVal targetObject2 As Object, _
                     ByVal pageId As String, _
                     ByVal parameters As ISKeyValueList, _
                     ByRef outcome As isefinDecisionOutcomeStatus, _
                     ByRef outcomeMessage As String, _
                     ByRef focusControlId As String) As Boolean

  Dim AccountPayment As finAccountPayment

  ' Assume Success
  Main = True

  ' Initialise
  AccountPayment = DirectCast(targetObject1, finAccountPayment)

  ' Handle Events
  Select Case eventId
    Case "TargetObjectChange"
      ' The target object source has been changed. Set any defaults or perform initialisation here
      ' Default Transaction Type if possible
      If ScriptInfo.FormApplicatonShortcut IsNot Nothing Then
        AccountPayment.TransactionTypeId = ScriptInfo.FormApplicatonShortcut.Parameters.GetString("TransType")
      End If
  End Select

End Function