Hi All,
I've done a customisation whereby the system will send an email with the document as an attachment when the user Release a document. I am using SMTP email OCX to perform the sending email.
However, the system will take some time to send out the email.
Therefore, i would like to have the progress bar showing the status that the system is sending the email in order to prevent the user to click on others button/perform others activities before the email has been sending out successfully.
i've added the coding for the progress bar, but the progress bar shows 100%. The sample code below will show the progress bar with 100% in stead of 80%.
anyone has any idea how to show the prgress bar for the process in stead of base on the number of records that work out the progress percentage.
Thank you.
sample coding :
Window.OPEN('Processing @');
....
....
....
IF NOT SMTPMail.WasSuccessful THEN
MESSAGE(SMTPMail.LastError)
ELSE
MESSAGE ('Email sent.');
Window.UPDATE(1, 8000);
Window.CLOSE;
0
Comments
A very common calculation for the progress bar used in Navision is:
If the process has events which gives you the current status back, you can calculate your progress based on them.
As Automation control calls locks Navision its not very much else to do.
hi tod,
base on your statement above, are you saying that there is nothing much that we can do to implement the progess bar for the event of sending email?
I once tried to build a progress form myself and put a timer event on it. But I never got the event when I called an external control.
When you call a function in an OCX or Automation control, Navision doesn't get any process time before the called function returns. Therefore it isn't possible to show the progress of the process when the control's executing. The only exception would be when the Automation/OCX control fires an event regarding the current status of progress.