User is having his notes crash after he click on a hospot button in a Notes Form

Hi,

I have an user that is geeting errors and his notes crash after he clicks on a hospot button in a Notes Form.

The formula is as follows:

@If(@IsDocBeingEdited; “”; @Command([EditDocument]; “1”));

FIELD CommentsApp1_1 := @Prompt([OkCancelEdit]; “Enter Your Comments”; “You must enter comments in the box below.”;“”);

FIELD AppStatfield := “App1AfterCmpl”;

FIELD Appnamefield := “Application1”;

FIELD Appresult := “Approve”;

@PostedCommand([FileSave]);

@Command([ToolsRunMacro]; “(Web Application App)”); << – Java script agent

@Command([ToolsRunMacro]; “(NotifySecurityofApproval)”); << – Java script agent

@PostedCommand([FileCloseWindow])

Somebody has any idea why he is getting the issue?

Thanks,

Sunny

Subject: Could be lots of things…

You don’t say what the error message is, or whether the crash occurs before or after the document is saved, or whether he sees the @prompt at all or not. Check to see if there is code in the QuerySave, PostSave etc events that is being triggered. Add prompts in the formula so you can see where it is getting to before the crash occurs, or better still rewrite it in LotusScript so you can step through it with the debugger. See if you can reproduce the problem in a test environment so that you can progressively remove potentially offending code until it no longer crashes, so you can isolate what might be causing the problem.

Subject: Re: User is having his notes crash after he click on a hospot button in a Notes Form

Hi, Thanks for your prompt response, I really appreciate it, I was OOO these days and I’m back today.

Here are my answers:

1.- You don’t say what the error message is.

The error I’m having is http://chadsmiley.com/chadsmiley/2006/05/lotus-notes-error-notification-cancel/

2.- Or whether the crash occurs before or after the document is saved, or whether he sees the @prompt at all or not.

The crash Occours after I see the prompt, I enter some information on it and click ok. I can validate the document some times get save and some other times it doesn’t.

3.- Check to see if there is code in the QuerySave, PostSave etc events that is being triggered.

I have this in the query save event.

@Command([ToolsRunMacro];“(WebAssignNum)”);

@If(webaction = “submit”; @Command([ToolsRunMacro]; “(Web Submit Request)”); “”);

@If(webaction = “submit” & Statuscode = 1;@PostedCommand([ToolsRunMacro];“(Web MgrApproval)”);“”);

@If(WebFlag != “”;@Command([ToolsRunMacro];WebFlag);“”);

@If(SSAssignedTo != “” & SSAssignedTo != OrigSSAssigned; @Command([ToolsRunMacro];“(Web UpdAssigned)”);“”);

@If(InitiationID != “”;

@Command([ToolsRunMacro];“(ITW - Update Status)”);“”);

@Command([ToolsRunMacro];“(Web Update Authors)”);

@Command([ToolsRunMacro];“(Web Update Pending Approvers)”)

and I have this in the PostSave event

Sub Postsave(Source As Notesuidocument)

Dim agentname As String

agentname = Source.FieldGetText("AgentName") 



If agentname <> "" Then

	RunAgent agentname, Source.Document.NoteID

	Source.refresh

	Source.close	

Else

	Source.close

End If		

End Sub

4.- Add prompts in the formula so you can see where it is getting to before the crash occurs, or better still rewrite it in LotusScript so you can step through it with the debugger. See if you can reproduce the problem in a test environment so that you can progressively remove potentially offending code until it no longer crashes, so you can isolate what might be causing the problem.

I can reproduce the error in the test environment.

Subject: Ok, now you can debug the problem…

Being able to reproduce problems in the test environment is half the battle, so now by looking at your test record which can reproduce the crash you can determine which of the various agents will be called, so you can eliminate them one by one (e.g. if agents A, B and C are called, and you remove the code in agent A and it no longer crashes then you know it is something in agent A; if it still crashes then you know it must be something in either B or C). Once you have narrowed it down to a specific agent, start removing code to again try to narrow down what piece of code may be causing the problem.

Subject: Ok, now you can debug the problem…

Hi, thank you for your prompt response, the problem that we are having is that the error is occurring randomly, so there is no way to know which agent is causing the problem, from 2600 employees so far he is the only one with the issue.