Create a user event script in after submit and get all transaction selected in the payment record. Create a Map Reduce script and trigger that map reduce script by using the userevent script. By using the Map reduce script get all the required files from the file cabinet and attach those files to the corresponding vendor payment.
When a user saves a bill payment record, the script will automatically fetch all attachments from the transactions listed under the “apply” subtab. These files will then be added to the bill payment record under the “communications” subtab.
To ensure smooth user interaction, we need to create a background script that triggers when the record is saved. This approach minimizes delays for the user, as the script will process the attachments in the background. This is particularly important when the bill payment involves multiple applied transactions, as fetching and attaching files can be time-consuming.
By handling this process in the backend, we avoid potential delays during the record save operation. However, please note that there might be a slight delay in seeing the attachments if there are numerous applied transactions.