Article Details
Id:21053
Product:finPOWER Connect
Type:NEW
Version:4.01.00
Opened:03/01/2024
Closed:03/01/2024
Released:29/04/2024
Job: J032682
High Importance

HTML Widgets; Can now be used as Summary Pages for Accounts and Clients in finPOWER Connect Cloud

HTML Widgets can now be used as Summary Pages for Accounts and Clients.

NOTE: This functionality is limited to finPOWER Connect Cloud.

The Options page of the Scripts form now allows the following to be specified:

  • [ShowAsSummaryPage]
    • If checked, then this HTML Widget will appear as a Summary Page
  • Object
    • The type of object the Summary Page is for (currently only Account or Client)

Unlike normal "Summary Page (version 2)" Scripts, HTML Widgets can 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 (true if unspecified)

The page order, as per "Summary Page (version 2)" Scripts, is based on the Script's code.

Since these Summary Pages are HTML Widgets, they are much more powerful than normal, static, Summary Pages, e.g., they can use Apex Charts to display information.

When deciding whether/how to display the Summary Page, the special HTML Widget event, "[ShowAsSummaryPage]" is called. This can update any of the three properties detailed above, e.g.:

Select Case eventId
  Case "[ShowAsSummaryPage]"
    ' 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, returnValue)
End Select

Unlike any other HTML Widget Script events, this event receives the object to Summaries (but only for this event) within the ScriptInfo.ContextData. This avoids the overhead of the Script needing to load an Account or Client to decide whether the page should be displayed or what the caption should be.

WARNING: Just like normal Summary Pages, it is up to the HTML Widget developer to ensure that system performance is not majorly impacted. For example a Client summary that attempted to display overdue balances of all of a Client's 100 Loans could be pretty costly performance-wise. In cases such as this consider a button on the Widget to load "expensive" information.