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.
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 | |