Skip to main content

Notifications

Announcements

No record found.

Project Service Automation forum

Cancelling or skipping standard method on ax

Posted on by 55

Hai,

There is a form on D365 DocumentUpload which is used to upload files from dives. That dialog form is closing once the upload is completed. Is there any way to stop that behavior . Because i need to add one OK button and on click of that button i need to do some other operation. But currently its closing once the upload is done. The below piece of code is the reason for the closing the form 

[FormCommandAttribute("CloseDialog")]
public void CloseDialog()
{
currentForm.close();
this.notifyUploadCompleted();
uploadFailed = false;
}


Any way to achieve.. looking forward to see the reply..

Thanks in advance.

  • Midhun Profile Picture
    Midhun 55 on at
    RE: Cancelling or skipping standard method on ax

    OK.. Thanks Sukrut, for you valuable time...

  • Midhun Profile Picture
    Midhun 55 on at
    RE: Cancelling or skipping standard method on ax

    hai Sukrut, Miroshnikov

    Yeah i can use the Pre event handler. if i use that also, anyhow the standard code will execute and the form will closed without waiting for the OK click. I have some process to do on click of ok button and its not a validation.. So i cant throw any error. All i want is i need to stop the beahaviour(closing the form automatically).

    Any hope..

    Regards,

    Midhun

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Cancelling or skipping standard method on ax

    Hi Midhun,

    You cannot skip standard code without overlaying, however, you can create pre handler that will show your button before closing the dialog and throw exception in case you have any validation to do to stop dialog from closing.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans