web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

OnUploadCompleted event for fileUpload control in a standard form extension

(0) ShareShare
ReportReport
Posted on by 223

Dear Experts,

I created the extension for a standard form and added a fileupload control. I want to do some validation once the file uploaded. 

I could not find the onluploadcompleted event for the custom control I added in the standard form extension.

If a new form is created there the file upload control contains the onluploadcompleted override method.

0576.pastedimage1649854511036v1.png

7750.pastedimage1649854621628v2.png

Any suggestion will be much appreciated.

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Martin,

    You can create a CoC on onUploadedCompleted method for this control and write your validation logic here.

  • martinarul Profile Picture
    223 on at

    Hello Gunjan,

    I tried that as well it did not work and threw the following error.

    "The next method cannot be invoked in the method OnUploadCompleted because its not a chain of command method"

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    I don't know why CoC can't be used in this case, but what should work is subsribing to notifyUploadCompleted delegate. For example:

    myFileUpload.notifyUploadCompleted  = eventhandler(this.myHandlerMethod);

  • martinarul Profile Picture
    223 on at

    Hi Martin,

    Thanks for the reply. I am using this in D365 vendor portal during vendor registration process. I want to enable the next button in the vendor registration wizard only the if the file is uploaded on my custom file upload control, which can be handled through "OnUploadCOmpleted" event/method of fileupload control.

    Can you suggest how to handle this with some sample code?

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    I'm not sure what you mean. I gave sample code about how to subscribe to an event in my previous reply.

    Are you asking about how you should implement the event hander, i.e. how to enable or disable the button.

    You said that it can be handled by OnUploadCompleted method, but you also said that it can't, because your code doesn't even compile. That's why I suggested an alternative.

  • martinarul Profile Picture
    223 on at

    Yes Martin. I got your code, but where shall I write this code to handle the validation?

  • Verified answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    The logic that you want to execute belongs to the event handler method (this.myHandlerMethod in my sample code). That's the custom method that will be executed when upload gets completed.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans