Field extensions
This document describes the tools and methods available to further customise records created / updated during electronic onboarding.
Eftsure allows the creation of onboarding forms with optional custom sections and fields that your organisation is likely to persist in your database. This can be achieved either through configuration or development, depending on your requirements. In most cases, such further extensions can help prevent additional manual and repetitive tasks.
Configuration
3 different tools are available to help configuring your fields, both available in the Parameters form:
- Default values
- Field mappings
- Contact Infos
See our Tutorials for examples.
Each tool will allow different configuration per onboarding form. The following fields will not be allowed for these features: System fields, non visible fields, non editable fields, Eftsure reserved fields. A note section is available at the bottom of the screen to enter any custom user notes, and a copy button is available to copy field mappings and default values to other form. These features have their own related data entities and are therefore exported and imported as part of the configuration. These features occur during the vendor creation/update process and are designed to run one after another, first default values, then field mappings, then contacts infos, then out of the box field mapping, the a call is made to onProcessCustomFields().
If the same field is used in both default values and field mappings, the latter will win.
Default values
Default values are like hardcoded values that the administrator can configure to change field values outside of the standard features.
With the above configuration, you can expect the following output from vendor creation.
Field Mappings
Field mappings allow the mapping of onboarding values to additional fields on table.
D365 is not aware of onboarding form design or fields, it uses the list of onboardings to populate the lookups below. Therefore it is recommended to perform an onboarding once the onboarding form design is completed, before configuring the field mappings.
With the above configuration, you can expect the following output from vendor creation.
The Onboarding Field column is a free text column and it's lookup is only populated once onboarding values exist, which shouldn't prevent anyone from configuring. This column relates to the Export Header Name Override property on the Eftsure onboarding form.
Value testers
For both features, a value tester is available at the bottom of the screen to allow visual validation of the rule: Example of valid string with related table (vendor account):
Example of invalid string with related table (vendor account):
Example of valid enum (Blocked: No):
Example of invalid enum (Blocked: None):
Contact Infos
Contact infos allow the creation of additional contact details based on onboarding values. You can configure new contact details:
- at the Vendor (Party) or Contact person level
- with different purposes or roles
- with different contact types (Email, Phone, ...)
D365 is not aware of onboarding form design or fields, it uses the list of onboardings to populate the lookups below. Therefore it is recommended to perform an onboarding once the onboarding form design is completed, before configuring the field mappings.
With the above configuration, and the following onboarding form values:
You can expect the following additions to standard vendor creation:
And the following addition to contact creation:
Extensions
Additionally, code extensions are available during several events raised by our solution.
The delegate PESUpsertVendor.onProcessCustomFields() is used to futher extend the out of the box solution, especially when complex rules and logic are required.
In this example, we'll create a new class called MyCustomCode:
Alternatively, you can also request field values by name when using 'Export Header Name Override'.
Infos.getValueByName('File1');
Infos.getExpiryByName('File1');
This method subscribes to the delegate and runs each time a vendor is updated, allowing each customer or partner to further extend this solution.
Custom fields
Custom sections and custom fields on onboarding and verification forms are downloaded from Eftsure during the 'Get onboarding information' step and are available for developers to interact with.
The custom fields, along with standard onboarding fields are stored in table PESONBOARDINGFIELD.
The standard onboarding fields are all prefix with an underscore. All the fields are displayed in the onboarding values form in order to validate onboarding and verifications. In the following screen, standard fields are highlighted in green and custom fields are highlighted in red.
Upload or attachments fields are automatically attached to both the onboarding record and the vendor record.
Export Header Name Override
If you wish to use naming conventions for your fields, in order to keep consistency across environments, you'll need to set a 'Export Header Name Override' in the field properties in the Eftsure portal. Then the field name will become the value from 'Export Header Name Override', instead of field text. In the following example, our File Upload field Contract has been named File1, and therefore will be retrieved later on as 'File1', instead of an integer field Id that is different from one environment to the other.
Code sample
[SubscribesTo(classStr(PESUpsertVendor), delegateStr(PESUpsertVendor, onProcessCustomFields))]
public static void PESUpsertVendor_onProcessCustomFields(PESOnboardingInfo infos, VendTable v, VendBankAccount vba)
{
v.PaymTermId = v.VendGroup == 'EMPL' ? 'D10' : Infos.getValueByName('PaymentTerms');
v.YourAccountNum = 'YOUR_NAME';
v.PaymId = 'YOUR_ID';
v.update();
}
Delegates
This module offers several integration points available in the form of delegate methods which are invoked as part of our workflow. Any developer can subscribe to delegates from our publisher classes to extend the features of this module. For more information about delegates in Microsoft Dynamics 365 FO, please refer to extensible code delegates.
List of available delegates
Several publisher classes are available during the Eftsure workflow to allow non-intrusive customisations by extensions, without over-layering:
- PESGetOnboardingInfo
- onInfoUpdate: Invoked once for each onboarding and verification upserted in the system when downloading supplier information from Eftsure.
- onDocumentBeforeInsert: Extension point to be used for before an attachment is created, amongst others, to set expiration date matching document
- onDocumentAfterInsert: Extension point to be used for after an onboarding attachment is created, amongst others, to set expiration date matching document
- PESInvite
- onReplacePlaceholders: Invoked when replacing placeholders on the invitation text to support custom placeholders
- PESLimitPayment
- onPaymentLimitUpdated: Invoked once each time a vendor bank account’s payment limit is updated into Eftsure
- PESSelfCertify
- onSelfCertified: Invoked once each time a vendor bank account’s self-certification status is updated into Eftsure.
- PESUpdate
- onVendBankAccountUpdated: Invoked each time Eftsure acknowledged a bank account update.
- onVerificationInfoUpserted: Invoked each time Eftsure a bank account verification information is received from Eftsure
- PESGetSupplierInfo
- onVendTableUpdated: Invoked each time a vendor is modified
- onVendBankAccountUpdated: Invoked each time a bank account is modified
- onPESVendTableUpdated: Invoked each time a vendor is modified
- onFailedToFindBankAccount: Invoked if the Eftsure supplier can’t be found in the system, allows the customer to have their own mapping rule for Eftsure’s supplier code. This delegate is mostly used for projects where Eftsure was connected to a legacy system prior to D365FO
- PESUpsertVendor
- onVendTableUpserted: Invoked each time a vendor is modified
- onVendBankAccountUpserted: Invoked each time a bank account is modified
- onUserUpserted: Invoke each time a user is upserted for vendor collaboration
- onProcessCustomFields: Invoked at the end of processing onboarding and verification information, but before committing the changes in the database. This is the recommended place to use your custom fields and store them into the database.