Hello Community,
I have created a custom popup dialog in the Sales Order Entry screen that prompts users for additional fields, when they Save or Remove Hold on an order.
Currently, the dialog shows the default title "Details".
I would like to dynamically change the dialog title so that it gives more context to the user. For example:

Opportunity <OpportunityID of the linked Opportunity> - Close as Won
e.g. Opportunity OP000123 - Close as Won
I tried using PXDialog.SetCaption(...), but I ran into the error:
CS0103: The name 'PXDialog' does not exist in the current context
This suggests that my project does not recognize the PXDialog class, even though I’ve added the code inside the AskExt initializer.
and custom dialog box is only in Code Editor & I’m, calling it from Key = Document (No Action Created)

Questions:
-
What is the correct way to override or set the caption/title of a popup shown by
AskExt?