# Link Parent Child Entity for Back Office

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

In this scenario:

* **Parent Entity**: Order Request Entity for Back Office
* **Child Entity**: Order Request Item Entity for Back Office

The relationship enables Back Office users to navigate from an order request to its corresponding order items and supplier information with proper data context.

***

### Objective

By completing this section, you will learn how to:

* Configure a parent‑child relationship between Back Office entities
* Map parent and child fields correctly using interface parameters
* Automatically generate a child navigation button
* Control visibility of the auto‑generated button based on Back Office requirements

***

### 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 Relationship

Configure the Parent Child Entity settings as follows:

1. **Parent Entity**:\
   `Doc Order Request - Back Office`
2. **Child Entity**:\
   `Doc Order Request Item - Back Office`
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 configuration ensures that the selected order request passes its `REQUEST_ID` to the related order item entity.

***

### 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 - Back Office`).

This button provides navigation from the parent entity to the child entity with the correct context.

***

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

In the Back Office scenario, the **ADD\_CHILD** button should not be visible on the child entity UI.

1. Edit entity **Doc Order Request Item - Back Office**.

* 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%252FWamEALpd5eAeH94rOmu7%252Fimage.png%3Falt%3Dmedia%26token%3Da2bd8ca0-8fe4-4630-8485-9712e3f534f2&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=8a3fd75d&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Summary

In this section, you have:

* Linked the Back Office Order Request entity with its Item entity
* Configured `REQUEST_ID` as the parent‑child linking key
* Enabled structured navigation between related records
* Controlled UI behavior by hiding an auto‑generated navigation button

This setup completes the **parent‑child entity configuration for the Back Office role**, ensuring correct data flow and clean navigation within 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-back-office.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.
