> 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**
