> For the complete documentation index, see [llms.txt](https://dyns.ntd.asia/power-dynamics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dyns.ntd.asia/power-dynamics/power-platform/model-driven-app/tip-hide-the-button-add-existing-record-on-subgrid.md).

# Tip: Hide the button "Add Existing Record" on subgrid

&#x20;   Today, I'm excited to share a helpful tip on concealing the "Add Existing Record" button within a specific subgrid on a Main Form.

&#x20;   I've established a one-to-many relationship between the "**Account**" entity and the "**Deal**" entity. Within the "**Deal**" entity, I've created a lookup field called "*Account (ntd\_account\_id)*," linking it to the "**Account**" entity. \
&#x20;   Following that setup, I proceeded by including the "**Deals**" **subgrid** onto the **main form** of the "**Account**" entity. *On the subgrid, I select the option "Show related record" via the field Account ID relationship.*

<figure><img src="/files/7diDY5w1CvaX8le7Crw2" alt=""><figcaption><p>Customize entity: Deal &#x26; Account</p></figcaption></figure>

Now, we back to the Application and try to create a new Deal for Account.&#x20;

<figure><img src="/files/6gSka3weK7O64MvvQp75" alt=""><figcaption><p>"Add existing Deal" button on subgrid</p></figcaption></figure>

When the user creates new Deals for this Account, users encounter the "Add existing Deal" button, which often leads to confusion due to its presence.&#x20;

At this time, previously, I will ask the Dev Team to hide this button immediately by using code. \
However, now, I discovered that the reason behind its visibility is **the Account ID field being set to an Option** attribut&#x65;**.**

<figure><img src="/files/zpsOBjZEna6hjtLcUCYn" alt=""><figcaption><p>Change the attribute of field: Option to Required</p></figcaption></figure>

{% hint style="info" %}
Set **Required = "Business required"** for a field that is being used to show related records on Subgrid.
{% endhint %}

Yup ... I did change the attribute of the **Account ID field - from "Option" to "Required".**&#x20;

Okay .. Let's go ... back to the Application and check now\..... :relaxed:

<figure><img src="/files/0AoNisyibdZD3m0e6Orl" alt=""><figcaption><p>The "Add existing Deal" hidden</p></figcaption></figure>

Tada :tada: The button was hidden.&#x20;

Hopping well!\
\&#xNAN;**\[NTD]yns.asia**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://dyns.ntd.asia/power-dynamics/power-platform/model-driven-app/tip-hide-the-button-add-existing-record-on-subgrid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
