# How to expand the dialog box

**URL:** <https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299>\
**Category:** Developer Forum\
**Tags:** d365fo\
**Created:** [November 6, 2024, 6:38am UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299 "2024-11-06T06:38:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![red\_wan](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@red\_wan](https://www.dynamicsuser.net/u/red_wan)\
**Post date:** [November 6, 2024, 6:38am UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/1 "2024-11-06T06:38:22Z")

</div>

I would like to rewrite the dialog screen that appears when updating the header information (e.g., Delivery address) on a purchase order.  
Specifically, I would like to change the standard wording and selections that are displayed.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/7/79ee996305a75271c91bee272adb078563dcf4a5.png)

How can this be implemented?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [November 6, 2024, 8:03am UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/2 "2024-11-06T08:03:11Z")

</div>

The first step is finding the current implementation. For example, open _Label search_ and find labels containing _Update delivery address on purchase_. It’ll find a single one; right-click it and choose _Find references_.

In the _Find Symbol Results_ window, you’ll see a single reference: to `promptCopyDeliveryAddress()` method on `PurchTable` table. Right-click it and choose _Go To Reference_ to open the code.

You’ll see this:

```auto
static DialogButton promptCopyDeliveryAddress()
{
    return Box::yesYesAllNoCancel("@SYS89799", DialogButton::Yes);
}

```

The method is extensible, but it’s not replaceable, therefore you can’t prevent the call of `Box::yesYesAllNoCancel()` and replace it with something else.  
If you look at where the method is called from, you’ll see you can’t prevent it there either.

At this moment, I’d consider again the actual business requirement. Maybe there is a different way how to address the business problem.

If not, you have the only option. Think about how you’d like the standard code to change and then create an extensibility request, where you’ll document your reasons and the suggested change.

---

<div class="post-metadata">

**Author:** ![devtoichoi](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@devtoichoi](https://www.dynamicsuser.net/u/devtoichoi)\
**Post date:** [November 13, 2024, 2:20am UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/3 "2024-11-13T02:20:38Z")

</div>

Hi MartinDrab, Can u tell me how to identify the method as [Replaceable], I tried looking in the method properties but it doesn’t seem to be mentioned there.  
Thank u very much, have a nice day.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [November 13, 2024, 5:48am UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/4 "2024-11-13T05:48:38Z")

</div>

The square brackets mean that it’s an attribute; you’d see it in code just above the method header.

You can find examples in standard code by using _Find references_ on _ReplaceableAttribute_ class. Here is one of them:

```auto
[Replaceable]
protected void deleteProdBOM(ProdBOMSearch _search)
{
    _search.prodBOM().delete();
}

```

---

<div class="post-metadata">

**Author:** ![devtoichoi](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@devtoichoi](https://www.dynamicsuser.net/u/devtoichoi)\
**Post date:** [November 18, 2024, 9:46am UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/5 "2024-11-18T09:46:25Z")

</div>

Hi MartinDrab, thanks for the response…

I have one more question, is there any way to auto click the Cancel button on the Dialog.  
I am extending promptCopyDeliveryAddress() to create my own custom dialog.  
I tried to find the ControlName of the dialog to use FormCommandButtonControl.clicked() but couldn’t find it.  
Do you have any keywords or suggestions for me?  
Thanks again.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [November 18, 2024, 12:24pm UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/6 "2024-11-18T12:24:49Z")

</div>

I don’t see how extending promptCopyDeliveryAddress() can solve your problem. Make sure test it before investing time to such an approach.

Regarding the Cancel, I would need to know more about how you’ve implemented the dialog. Because it a different topic than _How to expand the dialog box_, please create a new thread for it (after you verify that your design is otherwise feasible).

---

<div class="post-metadata">

**Author:** ![devtoichoi](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@devtoichoi](https://www.dynamicsuser.net/u/devtoichoi)\
**Post date:** [November 18, 2024, 3:09pm UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/7 "2024-11-18T15:09:18Z")

</div>

At first, I planned that after calling the system promptCopyDeliveryAddress(), I would set the default button to Cancel and press it to hide the standard dialog. Then I would extend it and write my custom dialog.  
However, while researching, I found that selecting the buttons on that dialog is impossible, so I will try to find another solution.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/6/6ecdd5cbd2f88cd4dffecb1f8bec0a959f6bb58d.png)  
[System-defined buttons - Finance & Operations | Dynamics 365](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/user-interface/system-defined-buttons#form-styles-that-have-no-system-defined-buttons)

Thanks for your feedback.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [November 18, 2024, 3:16pm UTC](https://www.dynamicsuser.net/t/how-to-expand-the-dialog-box/86299/8 "2024-11-18T15:16:36Z")

</div>

The documentation page is about a completely different thing, but anyway, I agree that your design wasn’t feasible.
