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.
OK.. Thanks Sukrut, for you valuable time...
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
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156