Home » Resources » How-to Guides » Dataverse & Dynamics 365 Installation Guide » Bank Account Validation Hub » Bank Account Validation Installation Guide » Bank Account Validation Adding to Form
Bank Account Validation: Adding to your Form
Adding Bank Account Validation to your Form
Included with the bank account validation solution is a custom PCF that can be added to your forms to quickly check if an account is valid or not. This control should be placed directly on the bank account validation result field on a model driven app form.
Due to the advanced configuration of the custom control, the maker portal cannot currently be used to assign the control to the form field which means you will have to switch to the classic form editor.
Once you are on the classic interface, select your field and apply the “Data8 BankValidation Indicator” control.
The options for the control are as follows:
Account Number Field: This should be bound to the account number field specified in the configuration page.
Sort Code Field: This should be bound to the sort code field specified in the configuration page.
BIC Code Field: This should be bound to the BIC code field specified in the configuration page.
IBAN Field: This should be bound to the IBAN field specified in the configuration page.
Validation Result: Disregard. This is an output property only which you do not need to configure.
Note: You have the choice of using sort code and account number or BIC code and IBAN to carry out bank account validation. You do not need to configure all of these if you do not require it.
Extending with JavaScript
By design, a custom control is applied to a field meaning it will only have context to itself and not the wider form. We do offer the option to extend any results and warnings to the form using some JavaScript. This will map any additional fields you have set up in the configuration page and display an error if you have configured it to do this.
To set this up, select “Form Libraries” on the left-hand side and add the “data8_bank_validation_base.js” library to your form.
Once this is added, add an event handler to the “On Load” event of your form called “data8_bank_validation_start”, ensuring the execution context is passed as the first parameter.
Adding Bank Account Validation to your Form (Legacy)
Note: This method is the legacy version and is no longer supported
When you initially set up your mappings, the system will automatically configure itself to save the validation result on save or update of any related fields.
If you want to have instant feedback, you can follow these additional steps:
Add the “data8_bankaccountvalidation.js” to your form with an event handler called “data8_bankvalidation_start” on the OnLoad event (ensuring you check the box saying “Pass execution context as first parameter”).