PermaLink Red Box of Death, I did not miss you01/04/2005 09:05 PM
Notes Development
I haven't seen too many "red boxes of death" since the later versions of R5 came out, and almost none in V6.x. Well, I found a way to get one to appear:



The following code, which is executed in an action button on a response document, produces a "Object handle is invalid" red box every time in my Notes 6.5.2 client:
FIELD history_mfg:=history_mfg;
FIELD created:=created;

date:= @Text(@Now);

name := "";

SUBJ := "<< Quote Request Notification From MFG - Project Ref# " + req_num + " >>";

BODY := SUBJ + @NewLine + "Request #: " + @Text(Incremented) +  "-" + req_num + @NewLine + "Piece Price: " + @Text(piecepc) + @NewLine + "Tooling Price: " + @Text(tooling) + @NewLine + "Comments Or Exceptions: " + body_notes + @NewLine + "See Link >> ";

@If(@IsNewDoc;@Prompt([Ok];"Notification!";"You Must Save The File Before You Can Initiate The Request.");@Do
(@If(@Prompt([YesNo]; "Send Memo?"; "A memo will be sent to Sales to notify them of your Quotation Response."); @Do(
@Set("name";@ProperCase(@Name([CN];@PickList( [Name] : [Single] ))));
@MailSend(name;"";"";SUBJ;"";BODY;[IncludeDoclink]);
@Prompt([Ok]; "Notification!"; "Your message has been summited.");
@SetField("history_mfg";history_mfg + @NewLine + "Your Sales Notification Was Sent To " + name + " On:      " + date);
@SetDocField ( $Ref; "SalesPublishDate"; @Now );
@Command ( [ViewRefreshFields] );
@Command ( [FileSave] );
@Command ( [CloseWindow] )
);
@Failure(@Prompt([Ok]; "Operation"; "Canceled")))))
The cause or instigator of the red box turned out to be the @SetDocField function. When I take it out, the code runs fine. I tried moving the call to @SetDocField around, but the same red box always appears. Not sure why. To get around this problem, I replaced @SetDocField with @Command ( [ToolsRunMacro]; "Set Parent" ), which works just fine.
Comments :v
No comments.
Credits
NuTechs Powered by Domino
Search
Calendar
July 2009
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Monthly Archive
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
By Category
The BlogRoll
About
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere