Code only executes with Lotusscript debugger

Hi,

I have been recently running into situations where editing an agent with lotusscript, when I go to run the agent in the client it does not execute the code as revised. Instead it runs the original pre-edit code. When I engage the script debugger, the code executes as saved.

I have tried closing Notes and reopening with the code changed, but the same issue occurs. Issue occurs on server and locally. Database is a template, but it occurs in non-template version. Non-lotusscript changes occur perfectly fine. Database is older (originally developed under version 3 I believe), but has been updatable until early 2007 when I first ran into this.

Has anyone else run into this type of issue or has any advise on how to resolve?

(agent is around 1000 lines long which is why there is no code sample.)

Thanks,

Alan

Subject: Code only executes with Lotusscript debugger

Alan: This is not a Notes specific fix, but similar to a disk error fix I made in 1987.

First try:

Cut and paste the new code to a new agent.

Do the same with the old agent, to a new one.

Delete the old agent, then close the database.



Open the database, and rename your new agent to the name you need. 

2nd try: You may be up against a total code limitation in the database, for agents, perhaps. If you have any old agents no longer, used delete them. It may be a full table of some kind, or other system buffer. I know the Script Libraries have a limit, and in one application I had to add a 2nd one when the first no longer accepted code. I don’t recall the exact error, as this was about 7 years ago.

Subject: RE: Code only executes with Lotusscript debugger

For anyone researching: I did Larry’s first solution - create a new agent and paste the old agent code into it. Works fine w/o the debugger now.

Subject: Code only executes with Lotusscript debugger

In designer, use Tools - Recompile All LotusScript.

Also, look for copies of the agent (or other relevant design elements) with the duplicate names.

Subject: RE: Code only executes with Lotusscript debugger

Perfect!!! Recompiled code works properly now.

Thanks for the help!