Id: | 21148 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 4.01.00 |
Opened: | 11/01/2024 |
Closed: | 13/03/2024 |
Released: | 29/04/2024 |
Job: | J032730 |
![]() |
Scripts; Summary Page (version 2); Can now use a '[ShowSummaryPage]' Script event to determine whether this page should be shown in finPOWER Connect Cloud
Summary Page (version 2) Scripts can now use a special '[ShowSummaryPage]' Script event to determine whether this page should be shown in finPOWER Connect Cloud
NOTE: This functionality is limited to finPOWER Connect Cloud.
The Options page of the Scripts form now allows the following to be specified:
- Supports [ShowSummaryPage] event?
If checked, this allows the Script to determine the following at runtime:
- Caption to display (the 'Caption' defined on the Options page of the Scripts form if unspecified)
- Visibility (true if unspecified)
- Whether to show before or after the record's standard pages (the 'Show at Start of Pages list' defined on the Options page of the Scripts for if unspecified)
When deciding whether/how to display the Summary Page, the special event, "[ShowSummaryPage]" is called. This can update any of the three properties detailed above, e.g.:
Select Case eventId
Case "[ShowSummaryPage]"
' Special "[ShowAsSummaryPage]" event
Dim Client As finClient = DirectCast(ScriptInfo.ContextData.GetObject("ObjectToSummarise"), finClient)
Dim obj As Object = New With {
.Caption = "KEY TEST",
.SummaryPageTop = True,
.Visible = Client.Active AndAlso Not Client.IsIndividualDeceased
}
Main = finBL.Runtime.WebUtilities.SerialiseObjectToJsonString(obj, text)
End Select
NOTE: For consistency with similar HTML Widget functionality, the object to summarise is passed in the Script's Context Data however, the source
parameter also contains the object to summarise.
WARNING: Just like any other scripting, it is up to the Summary Page developer to ensure that system performance is not majorly impacted.
Pasting template Script Code when this new option is enabled will, for "Visual Basic" Scripts, include sample code. For Account and Client objects, this sample code includes a slightly enhanced version, showing how the Script is passed the "ObjectToSummarise", as per the example above.