# Clone Leave Request Authorize Entity

This section explains how to **clone the Leave Request entity** and customize it for the **Authorize role**.\
The Authorize entity is used by the **final approver** to review prior approval details and make the **authorization decision** for a leave request.

***

### Objective

By completing this section, you will learn how to:

* Clone an existing Leave Request entity
* Enable Supervisor / PM decision fields for review
* Enable Authorize decision and remark fields for final approval
* Prepare an Authorize‑specific approval screen for Process Designer

***

### Step 1: Clone Supervisor PM Entity

1. From **ONEWEB App Designer**, go to\
   **Entities > Clone Entity**
2. In **Select Existing Entity**, choose:

   ```
   Doc Leave Request Supervisor PM
   ```
3. Set **Name of Clone Entity** to:

   ```
   Doc Leave Request Authorize
   ```
4. Click **Clone**
5. When the success message is displayed, click **Open Cloned Entity**
6. In the **Search Entities** popup, click the **Pencil icon** to edit the cloned entity

This creates a new entity based on the Supervisor PM screen, ready for Authorize customization.

***

### Step 2: Enable Supervisor / PM Decision for Review

#### Field: **Supervisor / PM** (Dynamic List)

1. Go to module **Leave Request**
2. Locate Dynamic List field **Supervisor/PM**
3. Click the **Pencil icon**

Configure:

* **viewFlag** = `Y`

1. Click **OK**

This allows the Authorize role to **view the Supervisor / PM decision**.

***

### Step 3: Enable Supervisor / PM Remark for Review

#### Field: **Supervisor / PM Remark** (Text Box)

1. Click the **Pencil icon**
2. Configure:
   * **viewFlag** = `Y`
3. Click **OK**

This displays the PM’s remark as read‑only information.

***

### Step 4: Enable Authorize Decision Field

#### Field: **Authorize** (Dynamic List)

1. Click the **Pencil icon**
2. Configure:
   * **viewFlag** = `N`
3. Click **OK**

Setting `viewFlag = N` enables the Authorize role to **actively select Approve or Reject**.

***

### Step 5: Enable Authorize Remark Field

#### Field: **Authorize Remark** (Text Box)

1. Click the **Pencil icon**
2. Configure:
   * **viewFlag** = `N`
3. Click **OK**

This allows the final approver to enter authorization remarks.

***

### Final Result

The completed **Doc Leave Request Authorize** entity appears as shown below:

<figure><img src="https://docs.oneweb.tech/oneweb/~gitbook/image?url=https%3A%2F%2F2015371994-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FMpDjHWFRUtZ5nJcSfVXd%252Fuploads%252FHFVxAuLkDiwZQJZZDse0%252Fimage.png%3Falt%3Dmedia%26token%3D5bd8695a-bcb0-4890-a30b-025953bb6ee0&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=9e82300&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Summary

In this section, you have:

* Cloned the Supervisor PM Leave Request entity for the Authorize role
* Enabled PM decision and remark fields for review
* Enabled Authorize decision and remark fields for final approval
* Prepared an Authorize‑specific approval screen aligned with the workflow

This entity represents the **final approval stage** in the **Leave Control App** and is now ready to be linked to **Process Designer Human Activities**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/oneweb-platform-th/tutorials-examples/leave-control-app/app-designer/clone-leave-request-authorize-entity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
