Introduction
This document intended to provide a detailed guide and examples on how to write EKL script to upload and attach multiple documents to any object.
Version – Validated on 2022x FD01 (FP2205) & 2023x FD02 (FP2314)
Pre-requisites
Licenses – In order to execute this script successfully, user must have below licenses assigned:
- CSV
- PPL
- KDI
Disclaimer: Licenses mentioned above are as per 2022x & 2023x documentation.
Examples
Below is the ready to use EKL script. User can create an knowledge action as described in "How to deploy section".
Working of the script
- Run the Knowledge Action.
- Select the object to which user want to attach the document.
- Browse for the file, which user wants to attach and copy it's full path name in a text file.
- Open the text file and read the path of file which needs to be attached.
- Create a new document object reference. (Upload the document)
- Attach the document to the selected object.
How to deploy
In order to use this script, follow below steps:
Create a VBScript:
1. Download the attached VBScript.
2. Create a VBScript. Copy paste the downloaded VBScript code.
3. Set the input arguments of VBScript as mentioned in script.
Create a knowledge action:
1. Download the attached EKL Script.
2. Create a knowledge action. Copy and paste the downloaded EKL Script.
3. Replace the old value of VBScript path with newly created VBScript.
4. Set the input arguments as mentioned in the script and click apply.
5. Execute the script and select the object to attach documents and click ok.
6. select the document to attach.
7. The document will be attached.
How to create knowledge action?
Note: Method to create VBScript is same as creating knowledge action.
Author
Person of Contact - @KA
