Hi all,I have a error handling code that I have copied from this forum to help me debug my LS online and it is reporting something that I don’t understand. The code seems to work correctly (change of status but does not get to the background emailing) except for the error message that gets printed on the page (as follows). The system is obviously picking up an error but I don’t know what it is and want avoid this error msg when the users will start using this. Can anyone help me figure out what the issue is?
Thanks,
Dan
'==================================================
OOPS …
An error has occured in the application.
Please report the following message to the system administrator:
Code - 4060: ASYNC_URL_GET_HEADER. (on line 3.)
Click here to return: RETURN
'==================================================
Agent code lanched from the WebQuerySave event of form (@Command([ToolsRunMacro]; “(SubmitHelpDesk)”)):
Sub Initialize
On Error Goto GenErr
Set maildb = New Notesdatabase("","MAIL1.BOX")
Set s = New NotesSession
Set db = s.CurrentDatabase
Set note = s.documentcontext
path=db.filepath
'-- set to 1 to debug via msgbox at server console
debugCode=0
'-- Get Doc fields
OriginalUNID = note.DocUnid(0)
’ SendListAll=note.NextUserEMail
SendListAll="me@corp.com"
CaseNum=note.CaseNumber(0)
Division=note.Division(0)
JobNum=note.GPJobNumber(0)
Delivered = note.Delivered(0)
DeliveryDate=note.DeliveredDate(0)
docAuthor=note.Author(0)
'currentUser=docAuthor(0)
currentUserEMail=note.AuthorEMail(0)
partialflag=""
'-- Generate Case Number
If note.CaseNumber(0)="-Not Assigned-" Or note.CaseNumber(0)="" Then Call SetCaseNum(db,note)
'== Build logic for e-mail
CaseNum=note.CaseNumber(0)
st=note.Status(0)
'== CHECK STATUS
If debugCode=1 Then Msgbox st
Select Case st
Case "Draft"
Exit Sub
'-- look if Case has been set to *Submitted* and set flags/email --
Case "Submitted"
'=====================
note.DateSubmitted=Now
'-- Generate Case Number
If note.CaseNumber(0)="-Not Assigned-" Or note.CaseNumber(0)="" Then Call SetCaseNum(db,note)
activitytag="HelpDesk Case Submitted"
Call UpdateActivity(activitytag)
MailSubject= "The following document was " & st & ": Case#" & note.CaseNumber(0)
MailTag="This Case has just been submitted. "
MailTag2="Please follow link to view submitted HelpDesk Case document :"
AlertType="Initial"
Call SendMail_CaseGroup(AlertType)
Call SendMail_Issuer(AlertType)
'-- look if Case has been set to *Cancelled* and set flags/email --
Case "Cancelled"
'=====================
note.DateCancelled=Now
activitytag=" Cancelled Case"
Call UpdateActivity(activitytag)
MailSubject= "The following document was " & st & ": Case#" & note.CaseNumber(0)
MailTag="This Case has been cancelled for the following reasons:" & note.RejectReasons(0)
MailTag2="Please follow link to view Case:"
AlertType="Initial"
Call SendMail_CaseGroup(AlertType)
Call SendMail_Issuer(AlertType)
'-- look if Case has been set to *Closed* and set flags/email --
Case "Closed "
'=====================
activitytag="HelpDesk ticket has been set to closed"
Call UpdateActivity(activitytag)
MailSubject= "The following document was " & st & ": Case#" & note.CaseNumber(0)
MailTag="This Case has been closed.:"
MailTag2="Please follow link to view Case:"
AlertType="Closed"
Call SendClosedMail(AlertType)
End Select
'==================================================
'-- Do the e-mail for help desk confirmation
If partialflag <>"1" Then Call logStatus
'-- get path (local is for debug)
If db.Server="" Then
p=note.ThisDBW(0)
Else
p=Path
End If
Exit Sub
GenErr :
Print "<BR><BR>OOPS ... <BR>"
'Call up the PrintErrorMsg routine from the ScriptLibrary item called ErrorHandlingSL
Call PrintErrorMsg( "Code - " & Str(Err) & ": " & Error$ + ". (on line " & Str(Erl) & ".) ", True)
Exit Sub
End Sub