<?xml version="1.0" encoding="utf-8"?><finScript version="1.00" exportedUtcDate="2020-03-25T01:51:53.0000000"><CreatedUserId>ADMIN</CreatedUserId><CreatedUtcDate>2020-03-24T21:00:21.5930000</CreatedUtcDate><UpdatedUserId>ADMIN</UpdatedUserId><UpdatedUtcDate>2020-03-25T01:22:44.0370000</UpdatedUtcDate><ScriptId>PARAM.ACCINTADJ</ScriptId><Description>Account Interest Adjustment</Description><ScriptType>HtmlWidget</ScriptType><Active>true</Active><AllowUI>false</AllowUI><Category /><Code>' HtmlWidget_AccountInterestAdjustment
Option Explicit On
Option Strict On

' #################################################################
' Account Interest Adjustment wizard HTML Widget
'
' Version: 1.03 (25/03/2020)
'
' Usage: System-defined HTML Widget
' #################################################################

' Constants
Private Const FORM_KEY As String = "AccountInterestAdjustment"

' Common Parameters
Private mAccountId As String

' Objects
Private mCombinedParameters As ISKeyValueList
Private mParameters As ISKeyValueList
Private mStartupParameters As ISKeyValueList

Public Function Main(eventId As String,
                     parametersJson As String,
                     startUpParametersJson As String,
                     hostingContext As isefinHtmlWidgetHostingContext,
                     requestInfo As finScriptRequestInfo,
                     ByRef returnValue As String) As Boolean

  ' Assume Success
  Main = True

  ' Get Parameters
  mParameters = finBL.CreateKeyValueList()
  mParameters.FromSimpleJsonString(parametersJson)
  mStartupParameters = finBL.CreateKeyValueList()
  mStartupParameters.FromSimpleJsonString(startUpParametersJson)

  ' Get Combined Parameters (Startup Parameters updated with event Parameters)
  mCombinedParameters = mStartupParameters.Clone()
  mCombinedParameters.UpdateFromKeyValueList(mParameters, True)

  ' Get Common Parameters
  With mCombinedParameters
    mAccountId = .GetString("AccountId")
  End With

  ' Handle Events
  Select Case eventId
    Case ""
      ' Main event, i.e., return initial HTML content (excluding html and body tags)
      returnValue = Replace(ScriptInfo.TemplateText, "&lt;%[RecordId]%&gt;", mAccountId)

    Case "Finish"
      ' Finish wizard
      Main = Finish(parametersJson, requestInfo, returnValue)

    Case "Form_AccountInterestAdjustment_Change"
      ' Get updated form information based on Date Adjustment change
      Main = Form_AccountInterestAdjustment_Change(parametersJson, returnValue)

    Case "GetInitialisationInfo"
      ' Get Initialisation Information required for this wizard
      Main = GetInitialisationInfo(returnValue)

    Case "WizardValidate"
      ' Validate wizard page
      Main = WizardValidate(parametersJson, returnValue)

    Case Else
      finBL.Error.ErrorBeginFormat("Unhandled event '{0}'.", eventId)
      Main = False
  End Select

End Function

''' &lt;summary&gt;
'''  Create a finAccountInterestAdjustment object from Web Service properties.
''' &lt;/summary&gt;
''' &lt;returns&gt;
'''  A Boolean value indicating success.
''' &lt;/returns&gt;
Private Function CreateAccountInterestAdjustment(accountId As String,
                                                 parameters As WizardFinishParameters,
                                                 ByRef accountInterestAdjustment As finAccountInterestAdjustment) As Boolean

  Dim Success As Boolean

  ' Assume Success
  Success = True

  ' Initialise
  accountInterestAdjustment = finBL.CreateAccountInterestAdjustment()

  ' Update
  With accountInterestAdjustment
    ' Load Account
    Success = .AccountLoad(AccountId)

    ' Update
    If Success AndAlso parameters IsNot Nothing Then
      .AdjustInterest = parameters.AdjustInterest
      If parameters.AdjustInterest Then
        .DateAdjustment = finBL.HtmlWidgetUtilities.GetDatabaseDateFromJsonUtcDate(parameters.DateAdjustment)
        .Notes = parameters.Notes
        .Reference = parameters.Reference
        .Value = parameters.Value
        .WithholdingTaxSet(finBL.Enums.isefinAccountTransactionResidentStatus_FromString(parameters.WithholdingTaxResidentStatusText), parameters.WithholdingTaxRate, parameters.WithholdingTaxValue)
      End If

      If parameters.AdjustInterestBackdatedTo Then
        .DateBackdatedTo = finBL.HtmlWidgetUtilities.GetDatabaseDateFromJsonUtcDate(parameters.DateBackdatedTo)
      End If
    End If
  End With

  Return Success

End Function

''' &lt;summary&gt;
'''  Create Context Data for Scripts.
''' &lt;/summary&gt;
Private Function CreateScriptContextData() As ISKeyValueList

  CreateScriptContextData = finBL.CreateKeyValueList()
  With CreateScriptContextData
    .SetObject("Target", ScriptInfo.Target)
    .SetBoolean("HighDpi", finBL.HighDpi)
    .SetString("FormKey", FORM_KEY)
    .SetString("FormRecordMode", iseFormRecordMode.Loaded.ToString())
  End With

End Function

''' &lt;summary&gt;
'''  Finish, i.e., Commit changes.
''' &lt;/summary&gt;
''' &lt;param name="parametersJson"&gt;
'''  A JSON formatted WizardFinishParameters object.
''' &lt;/param&gt;
Private Function Finish(parametersJson As String,
                        requestInfo As finScriptRequestInfo,
                        ByRef returnValue As String) As Boolean

  Dim AccountInterestAdjustment As finAccountInterestAdjustment
  Dim obj As Object
  Dim Success As Boolean
  Dim WizardFinishParameters As WizardFinishParameters

  ' Assume Success
  Success = True

  ' Parse Parameters
  If finBL.Runtime.WebUtilities.DeserialiseJsonStringToObject(parametersJson, GetType(WizardFinishParameters), obj) Then
    WizardFinishParameters = DirectCast(obj, WizardFinishParameters)
  Else
    Success = False
  End If

  ' Create Interest Adjustment object
  If Success Then
    Success = CreateAccountInterestAdjustment(mAccountId, WizardFinishParameters, AccountInterestAdjustment)
  End If

  ' Execute
  If Success Then
    Success = AccountInterestAdjustment.ExecuteCommit()
  End If

  ' Finalise
  If Success Then
    Success = finBL.Runtime.WebUtilities.SerialiseObjectToJsonString(New WizardFinishDetails(), returnValue)
  End If

  Return Success

End Function

''' &lt;summary&gt;
'''  Get updated form information based on a property change.
''' &lt;/summary&gt;
Public Function Form_AccountInterestAdjustment_Change(parametersJson As String,
                                                      ByRef response As String) As Boolean

  Dim AccountInterestAdjustment As finAccountInterestAdjustment
  Dim obj As Object
  Dim Success As Boolean
  Dim WizardFinishParameters As WizardFinishParameters

  ' Assume Success
  Success = True

  ' Parse Parameters
  If finBL.Runtime.WebUtilities.DeserialiseJsonStringToObject(parametersJson, GetType(WizardFinishParameters), obj) Then
    WizardFinishParameters = DirectCast(obj, WizardFinishParameters)
  Else
    Success = False
  End If

  ' Create Interest Adjustment object
  If Success Then
    Success = CreateAccountInterestAdjustment(mAccountId, Nothing, AccountInterestAdjustment)
  End If

  ' Update based on the value that has changed, which needs to be set last.
  If Success Then
    Select Case UCase(WizardFinishParameters.PropertyChanged)
      Case "DATEADJUSTMENT"
        With AccountInterestAdjustment
          .Value = WizardFinishParameters.Value
          .WithholdingTaxResidentStatusText = WizardFinishParameters.WithholdingTaxResidentStatusText
          .WithholdingTaxRate = WizardFinishParameters.WithholdingTaxRate
          .WithholdingTaxValue = WizardFinishParameters.WithholdingTaxValue

          .DateAdjustment = finBL.HtmlWidgetUtilities.GetDatabaseDateFromJsonUtcDate(WizardFinishParameters.DateAdjustment)
        End With

      Case "NUMVALUE"
        With AccountInterestAdjustment
          .DateAdjustment = finBL.HtmlWidgetUtilities.GetDatabaseDateFromJsonUtcDate(WizardFinishParameters.DateAdjustment)
          .WithholdingTaxResidentStatusText = WizardFinishParameters.WithholdingTaxResidentStatusText
          .WithholdingTaxRate = WizardFinishParameters.WithholdingTaxRate
          .WithholdingTaxValue = WizardFinishParameters.WithholdingTaxValue

          .Value = WizardFinishParameters.Value

          ' Force Withholding Tax to recalculate
          .WithholdingTaxReset()
        End With

      Case "NUMWITHHOLDINGTAXRATE"
        With AccountInterestAdjustment
          .DateAdjustment = finBL.HtmlWidgetUtilities.GetDatabaseDateFromJsonUtcDate(WizardFinishParameters.DateAdjustment)
          .Value = WizardFinishParameters.Value
          .WithholdingTaxResidentStatusText = WizardFinishParameters.WithholdingTaxResidentStatusText
          .WithholdingTaxValue = WizardFinishParameters.WithholdingTaxValue

          .WithholdingTaxRate = WizardFinishParameters.WithholdingTaxRate
        End With

      Case "NUMWITHHOLDINGTAXVALUE"
        With AccountInterestAdjustment
          .DateAdjustment = finBL.HtmlWidgetUtilities.GetDatabaseDateFromJsonUtcDate(WizardFinishParameters.DateAdjustment)
          .Value = WizardFinishParameters.Value
          .WithholdingTaxResidentStatusText = WizardFinishParameters.WithholdingTaxResidentStatusText
          .WithholdingTaxRate = WizardFinishParameters.WithholdingTaxRate

          .WithholdingTaxValue = WizardFinishParameters.WithholdingTaxValue
        End With
    End Select
  End If

  ' Create Response
  If Success Then
    obj = New With {
      .NetValue = AccountInterestAdjustment.NetValue,
      .WithholdingTaxRate = CDec(AccountInterestAdjustment.WithholdingTaxRate),
      .WithholdingTaxValue = AccountInterestAdjustment.WithholdingTaxValue,
      .WithholdingTaxResidentStatusText = AccountInterestAdjustment.WithholdingTaxResidentStatusText
    }
  End If

  ' Response
  If Success Then
    Success = finBL.Runtime.WebUtilities.SerialiseObjectToJsonString(obj, response)
  End If

  Return Success

End Function

''' &lt;summary&gt;
'''  Get Initialisation Information required for this wizard.
''' &lt;/summary&gt;
Public Function GetInitialisationInfo(ByRef response As String) As Boolean

  Dim AccountInterestAdjustment As finAccountInterestAdjustment
  Dim LastInterestAdjustmentDate As Date
  Dim FormInitialisationInfo As FormInitialisationInfo
  Dim Success As Boolean

  ' Assume Success
  Success = True

  ' Validate
  If Len(mAccountId) = 0 Then
    Success = False
    finBL.Error.ErrorBegin("Account Id not specified.")
  ElseIf finBL.CurrentUserInformation.IsAccountFilteredOut(mAccountId) Then
    Success = False
    finBL.Error.ErrorBegin("You do not have permission to view this record.")
  ElseIf finBL.Database.IsReadOnly Then
    Success = False
    finBL.Error.ErrorBegin("Access denied. Database is Read-Only.")
  ElseIf Not finBL.CurrentUser.Permissions.Allow("Account.InterestAdjustment") Then
    Success = False
    finBL.Error.ErrorBegin("You do not have permission to adjust Interest details.")
  End If

  ' Create Interest Change object
  If Success Then
    Success = CreateAccountInterestAdjustment(mAccountId, Nothing, AccountInterestAdjustment)
  End If

  ' Get Initialisation Info
  If Success Then
    FormInitialisationInfo = New FormInitialisationInfo()
    With FormInitialisationInfo
      ' Record
      .RecordId = AccountInterestAdjustment.Account.AccountId
      .RecordDescription = AccountInterestAdjustment.Account.Name

      ' General
      .AdjustInterest = AccountInterestAdjustment.AdjustInterest
      .DateAdjustment = finBL.HtmlWidgetUtilities.GetJsonUtcDateFromDatabaseDate(AccountInterestAdjustment.DateAdjustment)
      .Reference = AccountInterestAdjustment.Reference
      .Value = AccountInterestAdjustment.Value
      .WithholdingTaxRate = CDec(AccountInterestAdjustment.WithholdingTaxRate)
      .WithholdingTaxResidentStatusText = AccountInterestAdjustment.WithholdingTaxResidentStatusText
      .WithholdingTaxValue = AccountInterestAdjustment.WithholdingTaxValue
      .NetValue = CDec(AccountInterestAdjustment.NetValue)
      .Notes = AccountInterestAdjustment.Notes
      .AdjustInterestBackdatedTo = False
      .DateBackdatedTo = finBL.HtmlWidgetUtilities.GetNullableJsonUtcDateFromDatabaseDate(AccountInterestAdjustment.DateBackdatedTo)

      ' Min/ Max dates allowed for Adjustment Date
      If AccountInterestAdjustment.Account.DateOpened &gt; AccountInterestAdjustment.Account.Entity.DateTransactionBegin Then
        .DateAdjustmentMinValue = finBL.HtmlWidgetUtilities.GetJsonUtcDateFromDatabaseDate(AccountInterestAdjustment.Account.DateOpened)
      Else
        .DateAdjustmentMinValue = finBL.HtmlWidgetUtilities.GetJsonUtcDateFromDatabaseDate(AccountInterestAdjustment.Account.Entity.DateTransactionBegin)
      End If
      .DateAdjustmentMaxValue = finBL.HtmlWidgetUtilities.GetJsonUtcDateFromDatabaseDate(AccountInterestAdjustment.Account.Entity.DateTransactionEnd)

      ' Last Interest Adjustment tip
      LastInterestAdjustmentDate = AccountInterestAdjustment.Account.Transactions.GetLastInterestAdjustment()
      If LastInterestAdjustmentDate = Nothing Then
        .WarningInterestBackdatedTo = ""
      Else
        .WarningInterestBackdatedTo = String.Format("Last Interest adjustment dated {0}.", finBL.FormatDateLong(LastInterestAdjustmentDate))
      End If

      ' Lists
      .WithholdingTaxResidentStatusList = finBL.Enums.isefinAccountTransactionResidentStatus_ToCodeDescriptionList(False).ToJsonObject()

      ' Configuration
      .PromptOnCommit = finBL.CloudConnectFunctions.CloudConnectSettings.PromptOnCommit
      .ShowInterestBackdatedTo = (AccountInterestAdjustment.Account.AccountType.OptionInterestBackdating &lt;&gt; isefinAccountInterestBackdating.None)
      .ShowWithholdingTax = (AccountInterestAdjustment.Account.AccountClass = isefinAccountClass.Deposit)
    End With
  End If

  ' Response
  If Success Then
    Success = finBL.Runtime.WebUtilities.SerialiseObjectToJsonString(FormInitialisationInfo, response)
  End If

  Return Success

End Function

''' &lt;summary&gt;
'''  Validate a Wizard page.
''' &lt;/summary&gt;
''' &lt;param name="parametersJson"&gt;
'''  A JSON formatted object containing information required to validate a Wizard page.
''' &lt;/param&gt;
''' &lt;param name="returnValue"&gt;
'''  A JSON object; "true" if validation passed, otherwise, information as to why validation failed.
''' &lt;/param&gt;
Private Function WizardValidate(parametersJson As String,
                                ByRef returnValue As String) As Boolean

  Dim ConfirmList As List(Of String)
  Dim Data As Object
  Dim FailedControlId As String
  Dim FailedMessage As String
  Dim PageId As String
  Dim Success As Boolean

  ' Assume Success
  Success = True

  ' Get Parameters
  ' NOTE: Use the module mCombinedParameters since this contains Startup and event Parameters in a single Key/Value List
  With mCombinedParameters
    PageId = .GetString("PageId")
  End With

  ' Validate Page
  Select Case PageId
    Case "General"
      ' General
      If WizardValidate_General(parametersJson, ConfirmList) Then
        Data = ConfirmList
      Else
        Success = False
      End If
  End Select

  ' Finalise
  If Success Then
    Success = finBL.Runtime.WebUtilities.SerialiseObjectToJsonString(New WizardValidateResponse(Data, FailedMessage, FailedControlId), returnValue)
  End If

  Return Success

End Function

Private Function WizardValidate_General(parametersJson As String,
                                        ByRef confirmList As List(Of String)) As Boolean

  Dim AccountInterestAdjustment As finAccountInterestAdjustment
  Dim LastInterestAdjustmentDate As Date
  Dim obj As Object
  Dim Success As Boolean
  Dim WizardFinishParameters As WizardFinishParameters

  ' Assume Success
  Success = True

  ' Initialise ByRef
  confirmList = New List(Of String)()

  ' Parse Parameters
  If finBL.Runtime.WebUtilities.DeserialiseJsonStringToObject(parametersJson, GetType(WizardFinishParameters), obj) Then
    WizardFinishParameters = DirectCast(obj, WizardFinishParameters)
  Else
    Success = False
  End If

  ' Create Interest Change object
  If Success Then
    Success = CreateAccountInterestAdjustment(mAccountId, WizardFinishParameters, AccountInterestAdjustment)
  End If

  If Success Then
    ' Zero Interest Transaction
    If AccountInterestAdjustment.AdjustInterest AndAlso AccountInterestAdjustment.Value = 0 Then
      confirmList.Add("Are you sure you want to post a 'Zero' Interest Transaction?")
    End If

    ' Confirm if Backdated To changed AND prior to last Interest Adjustment date
    If AccountInterestAdjustment.DateBackdatedTo &lt;&gt; Nothing AndAlso AccountInterestAdjustment.DateBackdatedTo &lt;&gt; AccountInterestAdjustment.OriginalDateBackdatedTo Then
      LastInterestAdjustmentDate = AccountInterestAdjustment.Account.Transactions.GetLastInterestAdjustment()

      If AccountInterestAdjustment.DateBackdatedTo &lt;= LastInterestAdjustmentDate Then
        confirmList.Add(String.Format("The Interest 'Backdated To' date will only take effect from {0}, the day after the last Interest Adjustment transaction." &amp; vbNewLine &amp; vbNewline &amp; "To backdate prior to this date you must reverse the Interest Adjustment transaction.", finBL.FormatDate(LastInterestAdjustmentDate.AddDays(1), True)))
      End If
    End If
  End If

  Return Success

End Function

''' &lt;summary&gt;
'''  Wizard Initialisation Information.
''' &lt;/summary&gt;
Public Class FormInitialisationInfo

  ' Record
  Public RecordId As String
  Public RecordDescription As String

  ' General
  Public AdjustInterest As Boolean
  Public DateAdjustment As Date
  Public AdjustInterestBackdatedTo As Boolean
  Public DateBackdatedTo As Date?
  Public Reference As String
  Public Value As Decimal
  Public WithholdingTaxRate As Decimal
  Public WithholdingTaxResidentStatusText As String
  Public WithholdingTaxValue As Decimal
  Public NetValue As Decimal
  Public Notes As String

  Public DateAdjustmentMaxValue As Date
  Public DateAdjustmentMinValue As Date
  Public WarningInterestBackdatedTo As String

  ' Lists
  Public WithholdingTaxResidentStatusList As Object

  ' Configuration
  Public PromptOnCommit As Boolean
  Public ShowInterestBackdatedTo As Boolean
  Public ShowWithholdingTax As Boolean

End Class

''' &lt;summary&gt;
'''  Validation details.
''' &lt;/summary&gt;
Public Class WizardValidateResponse

  Public Data As Object
  Public FailedControlId As String
  Public FailedMessage As String

  Public Sub New(data As Object,
                 failedMessage As String,
                 failedControlId As String)

    Me.Data = data
    Me.FailedControlId = failedControlId
    Me.FailedMessage = failedMessage

  End Sub

End Class

''' &lt;summary&gt;
'''  Finish Parameters.
''' &lt;/summary&gt;
Public Class WizardFinishParameters

  Public AdjustInterest As Boolean
  Public AdjustInterestBackdatedTo As Boolean
  Public DateAdjustment As Date
  Public DateBackdatedTo As Date?
  Public Notes As String
  Public Reference As String
  Public Value As Decimal
  Public WithholdingTaxResidentStatusText As String
  Public WithholdingTaxRate As Decimal
  Public WithholdingTaxValue As Decimal

  ' Other
  Public PropertyChanged As String

End Class

''' &lt;summary&gt;
'''  Finish details.
''' &lt;/summary&gt;
Public Class WizardFinishDetails

End Class</Code><Language>VisualBasic</Language><Notes>System defined HTML Widget.

Used as a finPOWER Connect Cloud compatible version of the form "AccountInterestAdjustment".</Notes><PermissionKeyExecute /><RunWithoutPrompts>false</RunWithoutPrompts><TemplateText>&lt;div id="frmMain" class="is-widget-content"&gt;

  &lt;!-- Form Header --&gt;
  &lt;header&gt;
    &lt;div class="header"&gt;&lt;/div&gt;
    &lt;div class="summary"&gt;&lt;/div&gt;
    &lt;!-- Tabs --&gt;
    &lt;div id="tabWizard" class="is-tabs"&gt;
      &lt;ul&gt;
        &lt;li tabId="General" tooltipText="Enter Interest Adjustment details for the Account."&gt;Interest Adjustment&lt;/li&gt;
      &lt;ul&gt;
    &lt;/div&gt;
  &lt;/header&gt;


  &lt;!-- Pages --&gt;
  &lt;div class="is-widget-form-body"&gt;

    &lt;!-- General --&gt;
    &lt;div id="pageGeneral"&gt;
      &lt;table class="is-form"&gt;
        &lt;colgroup&gt;
          &lt;col style="width:8em" /&gt;
          &lt;col /&gt;
        &lt;/colgroup&gt;

        &lt;tr&gt;&lt;th colspan="2"&gt;&lt;label id="lblAccount"&gt;Account&lt;/label&gt;&lt;/th&gt;&lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="cboRecord"&gt;Account:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="cboRecord" /&gt;&lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;&lt;th colspan="2"&gt;&lt;label id="lblInterestAdjustmentTransaction"&gt;Interest Adjustment Transaction details&lt;/label&gt;&lt;/th&gt;&lt;/tr&gt;
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;input id="chkInterestAdjust" type="checkbox"/&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="dateAdjustment"&gt;Date:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="dateAdjustment"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="txtReference"&gt;Reference:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtReference" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="numValue"&gt;Value:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="numValue" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="cboWithholdingTaxResidentStatus"&gt;Resident:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="cboWithholdingTaxResidentStatus" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="numWithholdingTaxRate"&gt;Rate:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="numWithholdingTaxRate" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="numWithholdingTaxValue"&gt;Withhold Tax:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="numWithholdingTaxValue" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="numNetValue"&gt;Net Value:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="numNetValue" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="txtNotes"&gt;Notes:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtNotes" /&gt;&lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;&lt;th colspan="2"&gt;&lt;label id="lblInterestBackdatedTo"&gt;Interest Backdated to&lt;/label&gt;&lt;/th&gt;&lt;/tr&gt;
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;input id="chkInterestBackdatedTo" type="checkbox"/&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th class="indent1"&gt;&lt;label for="dateDateBackdatedTo"&gt;Date:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="dateDateBackdatedTo"/&gt;&lt;span id="divWarningInterestBackdatedTo" class="is-info-text warning small" style="display:none; padding-left:4px;"&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    &lt;/div&gt;

  &lt;/div&gt;

  &lt;!-- Form Footer --&gt;
  &lt;footer&gt;
    &lt;button id="cmdCancel" class="is-button"&gt;Cancel&lt;/button&gt;
    &lt;button id="cmdBack" class="is-button"&gt;&amp;lt; Back&lt;/button&gt;
    &lt;button id="cmdNext" class="is-button"&gt;Next &amp;gt;&lt;/button&gt;
    &lt;button id="cmdFinish" class="is-button ok"&gt;Finish&lt;/button&gt;
  &lt;/footer&gt;

&lt;/div&gt;

&lt;script&gt;
// Server-side information
var mRecordId = "&lt;%[RecordId]%&gt;";

// Properties
var mRecord;

// Controls
var C = {
  // General
  lblAccount: null,
  cboRecord: null,

  lblInterestAdjustmentTransaction: null,
  chkInterestAdjust: null,
  dateAdjustment: null,
  txtReference: null,
  numValue: null,
  cboWithholdingTaxResidentStatus: null,
  numWithholdingTaxRate: null,
  numWithholdingTaxValue: null,
  numNetValue: null,
  txtNotes: null,

  lblInterestBackdatedTo: null,
  chkInterestBackdatedTo: null,
  dateDateBackdatedTo: null,
  divWarningInterestBackdatedTo: null,
}

// Form
var frmMain;
var tabWizard;

// Wizard Buttons
var cmdCancel;
var cmdBack;
var cmdNext;
var cmdFinish;

// ==========
// Initialise
// ==========
$(function () {

  // --------
  // Controls
  // --------
  // General
  C.lblAccount = widget.UI.Label("lblAccount", {});
  C.cboRecord = widget.UI.DBCombo("cboRecord", {
    autoReadOnly: false,
    readOnly: true,
    showDropdown: false,
    width: widget.UI.FIELD_WIDTH_CODE_10
  });

  C.lblInterestAdjustmentTransaction = widget.UI.Label("lblInterestAdjustmentTransaction", {});
  C.chkInterestAdjust = widget.UI.CheckBox("chkInterestAdjust", {
    caption: "Create adjusting Interest transaction?",

    onChange: chkInterestAdjust_Change,
  });
  C.dateAdjustment = widget.UI.DateBox("dateAdjustment", {
    allowBlank: false,
    onChange: dateAdjustment_Change,
  });
  C.txtReference = widget.UI.TextBox("txtReference", {
    maxLength: 20,
  });
  C.numValue = widget.UI.NumberBox("numValue", {
    //allowBlank: false,
    decimals: -1,
    minValue: -999999999999,
    maxValue: 999999999999,
    onChange: numValue_Change,
  });
  C.cboWithholdingTaxResidentStatus = widget.UI.ComboBox("cboWithholdingTaxResidentStatus", {
    allowBlank: false,
    maxLength: 22,
  });
  C.numWithholdingTaxRate = widget.UI.NumberBox("numWithholdingTaxRate", {
    allowBlank: true,
    decimals: 4,
    minValue: 0,
    maxValue: 100,
    percentage: true,
    onChange: numWithholdingTaxRate_Change,
  });
  C.numWithholdingTaxValue = widget.UI.NumberBox("numWithholdingTaxValue", {
    allowBlank: true,
    decimals: -1,
    minValue: -999999999999,
    maxValue: 999999999999,
    onChange: numWithholdingTaxValue_Change,
  });
  C.numNetValue = widget.UI.NumberBox("numNetValue", {
    decimals: -1,
    minValue: -999999999999,
    maxValue: 999999999999,
    readOnly: true,
  });
  C.txtNotes = widget.UI.TextBox("txtNotes", {
    multiLine: true,
    rows: 3,
    maxLength: 255,
  });

  C.lblInterestBackdatedTo = widget.UI.Label("lblInterestBackdatedTo", {});
  C.chkInterestBackdatedTo = widget.UI.CheckBox("chkInterestBackdatedTo", {
    caption: "Update the Interest Backdated To date?",

    onChange: chkInterestBackdatedTo_Change,
  });
  C.dateDateBackdatedTo = widget.UI.DateBox("dateDateBackdatedTo", {
    allowBlank: true,
  });
  C.divWarningInterestBackdatedTo = $("#divWarningInterestBackdatedTo");

  // Grids

  // Create Widget form
  // NOTE: Hide by default for a cleaner startup
  frmMain = new widget.UI.Form("frmMain", { captionWidth: "9em", textboxWidth: "20em", visible: false });

  // Create Tabs
  tabWizard = new widget.UI.Tabs("tabWizard", { style: "wizard" });

  // Handle Wizard Buttons
  cmdCancel = $("#cmdCancel");
  cmdBack = $("#cmdBack");
  cmdNext = $("#cmdNext");
  cmdFinish = $("#cmdFinish");
  cmdCancel.click(tabWizard_Cancel);
  cmdBack.click(function() { tabWizard_Move(-1); });
  cmdNext.click(function() { tabWizard_Move(1); });
  cmdFinish.click(function() { Form_ExecuteAction("Finish"); });

  // Reset
  Form_Reset();
});

// ==========
// Reset Form
// ==========
function Form_Reset() {
  // Defaults

  // Set Tab
  tabWizard.SelectedTabId("General");

  // Resize
  Form_Resize();

  // Load Record (i.e., initialise wizard)
  Record_Load();
}

// ===========
// Load Record
// ===========
function Record_Load() {
  // Initialise
  mRecord = null;

  // Hide content
  frmMain.Visible(false);

  // Block UI
  widget.UI.Block("Initialising, please wait...");

  // Load Initialisation details
  var params = {recordId: mRecordId};
  widget.GetString("GetInitialisationInfo", params,
    // Success
    function (data) {
      mRecord = JSON.parse(data);
      Fields_Load();
    },

    // Fail
    function (message) {
      widget.UI.MsgBoxAlert("fail: " + message);
      Fields_Load();
    }
  );
}

// ===========
// Load Fields
// ===========
function Fields_Load() {
  if (mRecord) {
    // General
    C.cboRecord.RefreshUnbound(mRecord.RecordId, mRecord.RecordDescription);
    C.chkInterestAdjust.Value(mRecord.AdjustInterest);
    C.dateAdjustment.Value(mRecord.DateAdjustment);
    C.txtReference.Text(mRecord.Reference);
    C.numValue.Value(mRecord.Value);
    C.cboWithholdingTaxResidentStatus.Text(mRecord.WithholdingTaxResidentStatusText);
    C.numWithholdingTaxRate.Value(mRecord.WithholdingTaxRate);
    C.numWithholdingTaxValue.Value(mRecord.WithholdingTaxValue);
    C.numNetValue.Value(mRecord.NetValue);
    C.txtNotes.Text(mRecord.Notes);
    C.chkInterestBackdatedTo.Value(mRecord.AdjustInterestBackdatedTo);
    C.dateDateBackdatedTo.Value(mRecord.DateBackdatedTo);
    if (mRecord.WarningInterestBackdatedTo) {
      C.divWarningInterestBackdatedTo.text(mRecord.WarningInterestBackdatedTo);
      C.divWarningInterestBackdatedTo.show();
    }
    else  {
      C.divWarningInterestBackdatedTo.hide();
    }
  }

  // Unblock UI
  widget.UI.Unblock();

  // Update Controls

  // Update fields
  Fields_Update();

  // Refresh Tab
  tabWizard_Refresh();
}

// ===========
// Save Fields
// ===========
function Fields_Save() {
  // Not used by this wizard since there is no concept of updating an object behind the wizard
}

// =============
// Update Fields
// =============
function Fields_Update() {
  // Information Lists

  // Lists
  if (mRecord) {
    C.cboWithholdingTaxResidentStatus.ListFromCollection(mRecord.WithholdingTaxResidentStatusList, "Description");
  }

  // Controls
  if (mRecord) {
    // Adjustment Date Min/ Max allowable values
    C.dateAdjustment.MinValue(mRecord.DateAdjustmentMinValue);
    C.dateAdjustment.MaxValue(mRecord.DateAdjustmentMaxValue);

    // Show Withholding Tax details?
    if (mRecord.ShowWithholdingTax) {
      C.cboWithholdingTaxResidentStatus.VisibleRow(true);
      C.numWithholdingTaxRate.VisibleRow(true);
      C.numWithholdingTaxValue.VisibleRow(true);
      C.numNetValue.VisibleRow(true);
    }
    else {
      C.cboWithholdingTaxResidentStatus.VisibleRow(false);
      C.numWithholdingTaxRate.VisibleRow(false);
      C.numWithholdingTaxValue.VisibleRow(false);
      C.numNetValue.VisibleRow(false);
    }

    // Show Interest Backdated To details?
    if (mRecord.ShowInterestBackdatedTo) {
      // Must show checkboxes
      C.chkInterestAdjust.VisibleRow(true);

      C.lblInterestBackdatedTo.VisibleRow(true);
      C.chkInterestBackdatedTo.VisibleRow(true);
      C.dateDateBackdatedTo.VisibleRow(true);
      C.divWarningInterestBackdatedTo.show();
    }
    else {
      // No need for any checkboxes, and therefore also remove Indenting
      C.chkInterestAdjust.VisibleRow(false);
      $("#pageGeneral th").removeClass("indent1");

      C.lblInterestBackdatedTo.VisibleRow(false);
      C.chkInterestBackdatedTo.VisibleRow(false);
      C.dateDateBackdatedTo.VisibleRow(false);
      C.divWarningInterestBackdatedTo.hide();
    }

    // Update controls
    chkInterestAdjust_Change();
    chkInterestBackdatedTo_Change();
  }

  // Update Buttons
  tabWizard_UpdateButtons();

  // Show content
  frmMain.Visible(mRecord != null);

  // Show History
  if (mRecord) {
  }

  // Resize Tab
  tabWizard_Resize();
}

// ===========
// Resize Form
// ===========
function Form_Resize() {
  // General

  // Tab
  tabWizard_Resize();
}

// ==============
// Wizard Buttons
// ==============
function tabWizard_Cancel() {
  if (widget.CanClose()) {
    widget.Close();
  }
  else {
    widget.Reset();
  }
}

function tabWizard_UpdateButtons() {
  // Back and Next Buttons?
  if (tabWizard.TabCount() == 1) {
    cmdBack.hide();
    cmdNext.hide();
  }
  else {
    var tabIndex = tabWizard.SelectedTabIndex();
    cmdBack.prop("disabled", tabIndex &lt;= 0);
    cmdNext.prop("disabled", tabIndex &gt;= tabWizard.TabCount() - 1);
  }

  // Finish Button
  if (tabWizard.TabCount() != 1) cmdFinish.prop("disabled", !cmdNext.prop("disabled"));
}

// ==========
// Resize Tab
// ==========
function tabWizard_Resize() {
  switch (tabWizard.SelectedTabId()) {
    case "General":
      C.txtNotes.WidthResizeFromParent();
      C.txtReference.WidthResizeFromParent();
      break;

    default:
      break;
  }
}

// ===========
// Wizard Move
// ===========
function tabWizard_Move(direction) {
  var Ok;

  // Validate
  if (direction &gt; 0) {
    tabWizard_Validate(function () { tabWizard_MovePost(direction); });
  }
  else {
    // Can always move backwards
    tabWizard_MovePost(direction);
  }
}

function tabWizard_MovePost(direction) {
  var Ok = true;

  // Find Next Tab to Move To
  if (Ok) {
    var found = false;
    var newTab = tabWizard.SelectedTabIndex();

    do {
      newTab += direction;

      switch (tabWizard.GetTabIdByIndex(newTab)) {
        default:
          found = true;
          break;
      }

      // Found?
      if (found) {
        break;
      }
      else if (newTab == tabWizard.TabCount() - 1) {
        // Just in case!
        widget.UI.MsgBoxAlert("tabWizard_MovePost: Tab not handled!");
        break;
      }
    }
    while (true);

    // Refresh the New Tab
    tabWizard_Refresh(newTab);
  }
}

// ===========
// Refresh Tab
// ===========
function tabWizard_Refresh(newTab) {
  // Moving forward onto tab, so Load information
  if (newTab &gt;= tabWizard.SelectedTabIndex()) {
    switch (tabWizard.GetTabIdByIndex(newTab)) {
      case "General":
        break;

      default:
        break;
    }
  }

  // Make Tab it
  tabWizard.SelectedTabIndex(newTab);

  // Special
  switch(tabWizard.SelectedTabId()) {
    default:
      break;
  }

  // Tweak fields

  // Update Heading
  switch (tabWizard.SelectedTabId()) {
    default:
      frmMain.RefreshHeading(tabWizard.TabCaption(tabWizard.SelectedTabId()), tabWizard.TabTooltipText(tabWizard.SelectedTabId()));
      break;
  }

  // Back, Next command buttons valid?
  tabWizard_UpdateButtons();

  // Resize Wizard
  tabWizard_Resize();

  // Focus
  switch (tabWizard.SelectedTabId()) {
    default:
      tabWizard.FocusFirst();
      break;
  }
}

// ===============
// Validate Wizard
// ===============
function tabWizard_Validate(validCallback) {
  // Validate
  var Ok = tabWizard.Validate(true);

  // Other client-side validation
  if (Ok) {
    switch (tabWizard.SelectedTabId()) {
      case "General":
        // General
        if (!C.chkInterestAdjust.Value() &amp;&amp; !C.chkInterestBackdatedTo.Value()) {
          Ok = false;
          widget.UI.MsgBoxAlert("You must either tick 'Create adjsting Interest transaction?' or 'Update the Interest Backdated To date?'.");
        }
        break;

      default:
        // No validation
        validCallback();
        return;
    }
  }

  // Server-side validation
  if (Ok) {
    var params;

    switch (tabWizard.SelectedTabId()) {
      case "General":
        // General
        var params = CreateFinishParameters();
        break;
    }

    if (params) {
      // Disable Form
      frmMain.FormDisable("Validating");

      // Extend parameters
      params.pageId = tabWizard.SelectedTabId();

      // Call WizardValidate method in Script
      widget.GetString("WizardValidate",
                       params,
                       function (data) { tabWizard_ValidatePost(validCallback, data); },
                       tabWizard_ValidateFail);
    }
    else {
      // No server-side validation
      validCallback();
    }
  }
}

function tabWizard_ValidatePost(validCallback, data) {
  // Enable form
  frmMain.FormEnable();

  // Parse Data
  var o = {};
  if (data) o = JSON.parse(data);

  if (o.FailedMessage) {
    // -----------------
    // Validation failed
    // -----------------
    var o = JSON.parse(data);
    widget.UI.MsgBoxAlert(o.FailedMessage);
    if (o.FailedControlId) $("#" + o.FailedControlId).focus();
  }
  else {
    // ---------------------
    // Validation successful
    // ---------------------
    // Validation could pass back additional information, e.g., to use in tabWizard_Refresh
    switch (tabWizard.SelectedTabId()) {
      case "General":
        // General
        if (o.Data &amp;&amp; o.Data.length != 0) {
          // Confirm warnings
          widget.UI.MsgBoxConfirmList("To continue, please approve the following:",
                                      o.Data,
                                      {
                                        heading: "Additional Confirmation",
                                        icon: "Warning",
                                      },
                                      function () { validCallback(); },
                                      null);

          // Allow callbacks to continue
          return;
        };

        break;
    }

    // Callback
    validCallback();
  }
}

function tabWizard_ValidateFail(errorMessage)
{
  widget.UI.MsgBoxAlert(errorMessage);

  // Enable form
  frmMain.FormEnable();
}

// =================
// Execute an Action
// =================
function Form_ExecuteAction(actionId) {
  switch (actionId.toUpperCase()) {
    case "FINISH":
      // Finish
      Form_ExecuteAction_Finish();
      break;

    default:
      window.alert(mViewName + ".Form_ExecuteAction: Unhandled action '" + actionId + "'");
      break;
  }
}

// =============
// Finish Action
// =============
function Form_ExecuteAction_Finish() {
  // Validate
  tabWizard_Validate(function () {
    if (mRecord.PromptOnCommit) {
      // Confirm
      var heading = "Update Account Interest Details";
      var message = "";

      if (C.chkInterestAdjust.Value() &amp;&amp; C.chkInterestBackdatedTo.Value()) {
        message = "Are you sure you want to create an Interest Adjustment transaction and update the 'Interest Backdated To' date?";
      }
      else if (C.chkInterestAdjust.Value()) {
        message = "Are you sure you want to create an Interest Adjustment transaction?";
      }
      else if (C.chkInterestBackdatedTo.Value()) {
        message = "Are you sure you want to update the 'Interest Backdated To' date?";
      }

      if (message) {
        widget.UI.MsgBoxConfirm(message,
                                {
                                  heading: heading,
                                },
                                Form_ExecuteAction_FinishPost,
                                null);
      }
    }
    else {
      // Commit without prompting
      Form_ExecuteAction_FinishPost();
    }
  });
}

function Form_ExecuteAction_FinishPost() {
  // Disable Form
  widget.UI.Block("Committing, please wait...");

  // Finish
  widget.GetString("Finish", CreateFinishParameters(),
    function (data) {
      data = JSON.parse(data);

      // Finalise
      if (data.Warning) {
        widget.UI.MsgBoxAlert("The Interest Adjustment was successfully updated but the following warning was given:\n\n" + data.Warning, {}, Form_ExecuteAction_FinishPost_Finalise);
      }
      else {
        Form_ExecuteAction_FinishPost_Finalise();
      }
    },

    function (data) {
      // Show Error
      widget.UI.MsgBoxAlert(data);

      // Enable Form
      widget.UI.Unblock();
    }
  );
}

function Form_ExecuteAction_FinishPost_Finalise() {
  // Close Form
  widget.Close();

  // Refresh Parent (to show updated details)
  widget.RefreshParent();
}

// =================
// chkInterestAdjust
// =================
function chkInterestAdjust_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;

  if (C.chkInterestAdjust.Value()) {
    C.dateAdjustment.ReadOnly(false);
    C.txtReference.ReadOnly(false);
    C.numValue.ReadOnly(false);
    C.cboWithholdingTaxResidentStatus.ReadOnly(false);
    C.numWithholdingTaxRate.ReadOnly(false);
    C.numWithholdingTaxValue.ReadOnly(false);
    C.numNetValue.ReadOnly(true);
    C.txtNotes.ReadOnly(false);
  }
  else {
    C.dateAdjustment.ReadOnly(true);
    C.txtReference.ReadOnly(true);
    C.numValue.ReadOnly(true);
    C.cboWithholdingTaxResidentStatus.ReadOnly(true);
    C.numWithholdingTaxRate.ReadOnly(true);
    C.numWithholdingTaxValue.ReadOnly(true);
    C.numNetValue.ReadOnly(true);
    C.txtNotes.ReadOnly(true);
  }
}

// ======================
// chkInterestBackdatedTo
// ======================
function chkInterestBackdatedTo_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;

  if (C.chkInterestBackdatedTo.Value()) {
    C.dateDateBackdatedTo.ReadOnly(false);
  }
  else {
    C.dateDateBackdatedTo.ReadOnly(true);
  }
}

// ==============
// dateAdjustment
// ==============
function dateAdjustment_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;

  if (C.dateAdjustment.Value()) {
    AccountInterestAdjustment_Change("dateAdjustment");
  }
}

// ========
// numValue
// ========
function numValue_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;

  AccountInterestAdjustment_Change("numValue");
}

// =====================
// numWithholdingTaxRate
// =====================
function numWithholdingTaxRate_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;

  AccountInterestAdjustment_Change("numWithholdingTaxRate");
}

// ======================
// numWithholdingTaxValue
// ======================
function numWithholdingTaxValue_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;

  AccountInterestAdjustment_Change("numWithholdingTaxValue");
}

// ================================
// AccountInterestAdjustment_Change
// ================================
function AccountInterestAdjustment_Change(propertyChanged) {

  // Create Parameters
  var params = CreateFinishParameters();
  params.PropertyChanged = propertyChanged;

  widget.GetString("Form_AccountInterestAdjustment_Change", params, AccountInterestAdjustment_Change_Done, AccountInterestAdjustment_Change_Fail);
}

function AccountInterestAdjustment_Change_Done(data) {
  if (data) {
    // Parse
    var o = JSON.parse(data);

    // Update Record
    mRecord.NetValue = o.NetValue;
    mRecord.WithholdingTaxRate = o.WithholdingTaxRate;
    mRecord.WithholdingTaxValue = o.WithholdingTaxValue;
    mRecord.WithholdingTaxResidentStatusText = o.WithholdingTaxResidentStatusText;
  }

  // Load Fields
  C.cboWithholdingTaxResidentStatus.Text(mRecord.WithholdingTaxResidentStatusText);
  C.numWithholdingTaxRate.Value(mRecord.WithholdingTaxRate);
  C.numWithholdingTaxValue.Value(mRecord.WithholdingTaxValue);
  C.numNetValue.Value(mRecord.NetValue);
}

function AccountInterestAdjustment_Change_Fail(data) {
  widget.UI.MsgBoxAlert(data);
}

// ======================
// CreateFinishParameters
// ======================
function CreateFinishParameters() {
  // Create Parameters
  var params = {
    AdjustInterest: C.chkInterestAdjust.Value(),
    AdjustInterestBackdatedTo: C.chkInterestBackdatedTo.Value(),
    DateAdjustment: C.dateAdjustment.Value(),
    DateBackdatedTo: C.dateDateBackdatedTo.Value(),
    Notes: C.txtNotes.Text(),
    Reference: C.txtReference.Text(),
    Value: C.numValue.Value(),
    WithholdingTaxResidentStatusText: C.cboWithholdingTaxResidentStatus.Text(),
    WithholdingTaxRate: C.numWithholdingTaxRate.Value(),
    WithholdingTaxValue: C.numWithholdingTaxValue.Value(),
  };

  return params;
}

&lt;/script&gt;</TemplateText><TemplateTextBookmarks /><TimeoutSeconds>60</TimeoutSeconds><UniqueId>X8GlK+Nrm0u2HT5cWN+CfQ</UniqueId><AllowRefresh>true</AllowRefresh><Caption /><HtmlWidgetMaxHeight>1200</HtmlWidgetMaxHeight><HtmlWidgetMaxWidth>800</HtmlWidgetMaxWidth><HtmlWidgetNeverApplyStyling>false</HtmlWidgetNeverApplyStyling><HtmlWidgetResourceCssSummaryPage2>false</HtmlWidgetResourceCssSummaryPage2><HtmlWidgetResourceCssWidget>true</HtmlWidgetResourceCssWidget><HtmlWidgetResourceJQuery>true</HtmlWidgetResourceJQuery><HtmlWidgetResourceJQueryVersion /><Icon /><JavaScriptDebugger>None</JavaScriptDebugger><RestrictedOriginsListEnabled>false</RestrictedOriginsListEnabled><WebServiceName /><WebServiceAllowAnonymous>false</WebServiceAllowAnonymous><WebServiceSendDebugInformation>false</WebServiceSendDebugInformation><ShowInMenu>None</ShowInMenu><ParametersType>Custom</ParametersType><Parameters><ISParameterDefs version="1.00"><Parameters><Parameter name="" type="SectionStart"><BlankTip /><Caption>TESTING</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText>These are the Parameters required by this HTML Widget to function correctly.
They are listed here for testing purposes only.</TooltipText><SectionColumns>1</SectionColumns><Visible>true</Visible></Parameter><Parameter name="AccountId" type="List"><BlankTip /><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><List>RANGE.Accounts</List><LimitToList>false</LimitToList><MaxLength>0</MaxLength><Rows>1</Rows></Parameter></Parameters></ISParameterDefs></Parameters></finScript>