# Clone Order Request Entity for Admin

This section explains how to **clone an existing Order Request entity** and customize it for the **Admin role**, whose responsibility is to **add and manage supplier lists** for order items.

Instead of building a new entity from scratch, ONEWEB allows you to **clone an existing entity** and modify its behavior, fields, and actions to fit a different role.

***

### Objective

By completing this section, you will learn how to:

* Clone an existing Order Request entity
* Customize the cloned entity for the Admin role
* Enable additional fields required for Admin decisions
* Remove actions that are not applicable to Admin users
* Prepare the entity for supplier‑related processing

***

### Step 1: Open Clone Entity

1. From the **ONEWEB App Designer** screen, select\
   **Entities > Clone Entity**
2. The **Clone Entity** dialog opens

<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%252FjV1vcKiYUq75CZ7jCLtN%252Fimage.png%3Falt%3Dmedia%26token%3D6dc9e04e-06ec-4a53-9eb5-1315096e90a9&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=d0fc90f1&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Step 2: Clone the Requester Entity

1. At **Select Existing Entity**, choose **Requester**
2. At **Name of Clone Entity**, enter\
   `Doc Order Request Item - Admin`
3. Click **Clone**
4. Wait until the message\
   \&#xNAN;**“Entity has been imported successfully”** appears
5. The button **Open Cloned Entity** becomes available

<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%252FBIjcLFj5b6s75cRThbHw%252Fimage.png%3Falt%3Dmedia%26token%3Ddfcbd4c2-f363-464f-9a16-eda7fa1e6a0b&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=558a0bc4&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Step 3: Open the Cloned Entity

1. Click **Open Cloned Entity**
2. The **Search Entities** dialog appears
3. Click the **pencil icon** to edit the cloned entity

***

### Step 4–6: Enable View Mode for Order Request Fields

In **Order Request** module:

1. Edit **Project**
   * Click pencil icon
   * Set `viewFlag` = `Y`
   * Click **OK**
2. Edit **Phase**
   * Set `viewFlag` = `Y`
   * Click **OK**
3. Edit **Description**
   * Set `viewFlag` = `Y`
   * Click **OK**

These fields are displayed in read‑only mode for Admin users.

***

### Step 7–9: Add Decision Fields for Admin

1. From **Order Request** module, click **Append Row**
2. Add **Dynamic List** field (first cell)

   Configure as follows:

   * Table Name: `wf_ms_list_box`
   * Column Show: `DISPLAY_NAME`
   * Column Value: `DISPLAY_CODE`
   * Condition Value: `category_code = 'ADMIN_DECISION'`
   * FIELD\_ID: `DECISION`
   * Populate ShowFieldName → `Decision`
   * Click **OK**
3. Add **Textarea** field (second cell)

   Configure as follows:

   * FIELD\_ID: `DECISION_REMARK`
   * Populate ShowFieldName → `Decision Remark`
   * Click **OK**

***

### Step 10–12: Remove Unused Entity Buttons

From **Entity Buttons** section:

1. Remove **SAVE** button where Page Action = `ENTITY_INSERT`
2. Remove **CANCEL** button where Page Action = `ENTITY_INSERT`
3. Remove **CREATE** button

These actions are not required for Admin role.

***

### Step 13–16: Enable View Mode for Order Request Item Fields

In **Order Request Item** module:

1. Edit **Hardwareid**

* Set `viewFlag` = `Y`
* Click **OK**

2. Edit **Spec**

* Set `viewFlag` = `Y`
* Click **OK**

3. Edit **Unit**

* Set `viewFlag` = `Y`
* Click **OK**

4. Edit **Remark**

* Set `viewFlag` = `Y`
* Click **OK**

This ensures Admin users can view item details but not modify them.

***

### Step 17: Remove Item‑Level Actions

From **Order Request Item** module:

1. Remove the following buttons:

* **ADD**
* **DELETE**

Admin users should not add or delete order items at this stage.

***

### Step 18: Save the Entity

1. Click **Save this Entity** to complete the configuration.

The completed 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%252FuNlcuZFrORAr1YRabvMn%252Fimage.png%3Falt%3Dmedia%26token%3Db9c8eb9f-a846-4b9e-bd86-338d1a381f9d&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=2dd9a5a9&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Summary

In this section, you have:

* Cloned the original Order Request entity
* Customized it for the Admin role
* Enabled Admin‑specific decision fields
* Removed requester‑specific actions
* Prepared the entity for supplier list management

This cloned entity allows Admin users to review order requests, record decisions, and manage supplier information as part of the **Order Management App (Web)** workflow.


---

# 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/order-management-app-web/app-designer/clone-order-request-entity-for-admin.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.
