# Link Parent Child Entity for Admin

This section explains how to **link a parent entity and a child entity** for the **Admin role** using **Parent Child Entity Configuration** in ONEWEB App Designer.

In this scenario:

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

The relationship allows Admin users to navigate from an order request to its related order items and supplier lists in a controlled manner.

***

### Objective

By completing this section, you will learn how to:

* Configure a parent‑child relationship between two entities
* Define field mappings used to pass context between entities
* Automatically generate navigation buttons
* Control the visibility of auto‑generated buttons for Admin use cases

***

### 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** 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%252F2oDPlFPNXaGwsfkiBMQE%252Fimage.png%3Falt%3Dmedia%26token%3Da689a5ae-dda8-43b9-9f20-daab48280cb0&#x26;width=300&#x26;dpr=1&#x26;quality=100&#x26;sign=44d6504f&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

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

Configure the relationship as follows:

1. **Parent Entity**: `Doc Order Request - Admin`
2. **Child Entity**: `Doc Order Request Item - Admin`
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`

This configuration defines how the selected parent record passes its context (REQUEST\_ID) to the child entity.

***

### Step 11: Save Configuration

1. Click **Save**

After saving:

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

This button allows navigation from the parent entity to the child entity.

***

### Step 12: Hide Auto‑Generated ADD Button (Admin Scenario)

In this case, the Admin entity does not require a visible **ADD** button in the UI.

1. Go back to edit entity **Doc Order Request Item - Admin**

* Locate the module button **ADD**
* Click the **pencil icon** to edit
* Change **Page Action** to\
  `-- Please select --` (to hide 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%252FViDkwZizzvtvGN4EUzVb%252Fimage.png%3Falt%3Dmedia%26token%3Dbeab6d2b-3497-4e5e-895b-4b4d82010fa6&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=9dddc1cf&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Summary

In this section, you have:

* Linked the Admin Order Request entity with its Item entity
* Defined how `REQUEST_ID` is passed between parent and child
* Enabled structured navigation between related records
* Controlled UI behavior by hiding an auto‑generated action button

This configuration completes the **parent‑child relationship setup for the Admin role**, ensuring clean navigation and proper data context in the **Order Management App (Web)**.


---

# 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/tutorials-examples/order-management-app-web/app-designer/link-parent-child-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.
