# Link Parent Child Entity for Authorize

This section explains how to **link the Order Request Entity and the Order Request Item Entity** for the **Authorize role** using the **Parent Child Entity** configuration feature in ONEWEB App Designer.

In this scenario:

* **Parent Entity**: Order Request Entity for Authorize
* **Child Entity**: Order Request Item Entity for Authorize

This configuration allows users in the Authorize role to **navigate from an order request to its related order items and supplier details**, with the correct request context passed automatically.

***

### Objective

By completing this section, you will learn how to:

* Configure a parent‑child relationship for the Authorize role
* Map parent and child fields using interface parameters
* Auto‑generate a navigation button for child entities
* Hide the auto‑generated button when it is not required in the UI

***

### Step 1: Open Parent Child Entity Configuration

1. From the **ONEWEB App Designer** screen, click\
   **Utilities > Parent Child Entity**.
2. In the popup dialog, click the **plus (+)** icon.
3. The **Parent Child Entity Configuration** screen opens.

***

### Step 2–10: Configure Parent and Child Mapping

Configure the Parent Child Entity settings as follows:

1. **Parent Entity**:\
   `Doc Order Request - Authorize`
2. **Child Entity**:\
   `Doc Order Request Item - Authorize`
3. **Parent Tab**:\
   `Order Item`
4. **Child Tab**:\
   `Supplier List`
5. **Parent Module**:\
   `Order Request Item`
6. **Parent’s Fields**:\
   `REQUEST_ID`
7. **Interface Parameters**:\
   `REQUEST_ID`
8. **Child’s Fields**:\
   `REQUEST_ID`
9. **Display Value**:\
   `ADD_CHILD`

This setup ensures that the selected order request passes its `REQUEST_ID` to the related order item entity when navigation occurs.

***

### Step 11: Save Configuration and Generate Button

1. Click **Save**.

After saving:

* A new Parent Child Entity record is created.
* The system automatically adds a module button named **ADD\_CHILD** to the parent entity\
  (`Doc Order Request - Authorize`).

This button allows navigation from the parent entity to the child entity with the appropriate data context.

***

### Step 12: Hide Auto‑Generated ADD\_CHILD Button

For the Authorize role, the **ADD\_CHILD** button should not be visible in the child entity UI.

1. Edit entity **Doc Order Request Item - Authorize**:

* Locate the module button **ADD\_CHILD**
* Click the **pencil icon** to edit the button
* Change **Page Action** to\
  `-- Please select --` (this hides the button)
* Click **OK**
* Save the entity

<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%252FzxDff9SYcFFL56hD8XcG%252Fimage.png%3Falt%3Dmedia%26token%3D727094a4-75a9-441b-ba6b-f6f8bf0bca57&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=12ae05c7&#x26;sv=2" alt=""><figcaption></figcaption></figure>


---

# 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/link-parent-child-entity-for-authorize.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.
