# Customize generate mode caption of the prompt dialog page
In this article, you learn how to change the caption shown in the UI when Copilot is retrieving generated results from the Azure OpenAI service. The UI is defined by the generate mode of the prompt dialog page. Its purpose is to give users feedback about what's happening with Copilot. The caption functions as a kind of progress bar for the user. By default, the caption of PromptDialog page when it's in the generate mode is Generating, as illustrated in the following figure:
![Shows a screenshot of the default generate mode of the PromptDialog type page]<https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/media/promptdialog-generate-mode.svg#lightbox>
Customizing the caption enables you to give users more specific feedback about what Copilot is doing or how it's progressing. This feedback is especially useful if the Copilot consists of multiple steps or takes a long time.
## How to change the caption
You customize the caption by using the methods-auto/dialog/dialog-open-method or methods-auto/dialog/dialog-update-method methods.
There are different ways to use the `Dialog.Open()`and `Dialog.Update()` to change the generate mode's caption. Refer to the following examples for inspiration.
## Example: From the OnAction() trigger
The following code example illustrates how to change the generate mode caption directly from the `OnAction()` trigger of Generate and Regenerate actions. The code snippets use the `OnAction()` trigger to change the caption to:
 Creating a draft for you... when generating the first draft with Copilot.
 Revising the draft for you... when regenerating a draft.
```al
systemaction(Generate)
{
    trigger OnAction()
    var
        GenerateModeProgress: Dialog;
    begin
        GenerateModeProgress.Open('Creating a draft for you...');
    end;
}

systemaction(Regenerate)
{
    trigger OnAction()
    var
        GenerateModeProgress: Dialog;
    begin
        GenerateModeProgress.Open('Revising the draft...');
    end;
}

```
The following figures illustrate the customized captions in the UI:
<https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/media/promptdialog-generate-mode-custom.svg#lightbox>
<https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/media/generate-mode-caption-revising.svg#lightbox>
## Example: From the RunGeneration() procedure
This example changes the generate mode caption by calling the `Dialog.Open()` method from the procedure that generates the results (for purposes of this article, the `RunGeneration()`).
```al
systemaction(Generate)
{
    Caption = 'Generate';

    trigger OnAction()
    begin
        RunGenerate(CopilotGeneratingTxt);
    end;
}
systemaction(Regenerate)
{
    Caption = 'Regenerate';
    trigger OnAction()
    begin
        RunGenerate(CopilotRegeneratingTxt);
    end;
}
```
```al
local procedure RunGenerate(ProgressTxt: Text)
begin
    GenerateModeProgress.Open(ProgressTxt);
    ...

end;
```
```al
var
    GenerateModeProgress: Dialog;
    CopilotGeneratingTxt: Label 'Creating a draft for you...';
    CopilotRegeneratingTxt: Label 'Revising the draft...';
```
For a more comprehensive example, go to Advanced_SuggestJob sample on GitHub<https://github.com/microsoft/BCTech/blob/002affcf1520a710c270257d6547e25a9a223e85/samples/AzureOpenAI/Advanced_SuggestJob/DescribeJob/CopilotJobProposal.Page.al>.
## Next steps
 copilot-design-prompt-mode
 copilot-design-content-mode
 Launch Copilot prompt dialog page<devenv-page-prompting-floating-actionbar>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/copilot-customize-generate-mode, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/copilot-customize-generate-mode/
