Article Details
Id:12349
Product:finPOWER Connect
Type:NEW
Version:2.02.02
Opened:21/10/2014
Closed:21/10/2014
Released:07/11/2014
Job: J014363

Scripts; Inserting a standard block now produces slightly different code

Previously when inserting a standard block in the a "Summary Page Standard Block Override" type Script via the "Insert Standard Block" menu option, template code similar to the following was produced:

Public Overrides Function Account_Monitoring(callerScriptInfo As ISScriptExecutionInfo,
                                             account As finAccount,
                                    Optional onlyIncludeIfMonitored As Boolean = False,
                                    Optional includeActions As Boolean = True,
                                    Optional otherParameters As ISKeyValueList = Nothing) As ISSummaryTables

  Account_Monitoring = MyBase.Account_Monitoring(callerScriptInfo, account, onlyIncludeIfMonitored, includeActions, otherParameters)
  
End Function

The code that is now producesd explicitly declares a Summary Tables collection and returns this since attempting to access items in the Summary Tables collection when using the default function name variable could cause compiler errors, e.g., if you tried to access Account_Monitoring("Main").

An example of the new, safer, code is:

Public Overrides Function Account_Monitoring(callerScriptInfo As ISScriptExecutionInfo,
                                             account As finAccount,
                                    Optional onlyIncludeIfMonitored As Boolean = False,
                                    Optional includeActions As Boolean = True,
                                    Optional otherParameters As ISKeyValueList = Nothing) As ISSummaryTables

  Dim SummaryTables As ISSummaryTables

  SummaryTables = MyBase.Account_Monitoring(callerScriptInfo, account, onlyIncludeIfMonitored, includeActions, otherParameters)

  Return SummaryTables

End Function