Detach Document from any Object using EKL

Introduction

This document intended to provide a detailed guide and examples on how to write EKL script to detach documents from objects.

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 for Detaching Documents from any object. User can create a knowledge action in order to use this script.

Detach Documents EKL Script.

How the script works.

1. Run the Knowledge action.
2. Select the object from which user want to detach the documents.
3. Get list of documents attached to the selected object.
4. Run a for loop on the list of documents.
i. Ask the user whether to detach the document in the loop.
ii. If user select Yes, detach the document. Otherwise go for next item in list.
5. End.

How to Deploy

In order to use this script, follow below steps:

1. Download the attached EKL scripts.

2. Create a knowledge action.

3. Copy and paste the content of attached EKL script in the newly created action.

4. Set the input arguments as mentioned in the script and click apply.

5. Execute the script and select the input arguments.

6. Click ok.

How to create knowledge action?​​​​​​​​​​​​​​

Author

Person of Contact - @KA ​​​​​​​

Comments 0