closewindow failed

Hi,
I tried the following however though the mail is sent out
and the file is saved but the form window is not closed
and the Sales frame is not displayed.

any clues? Thanks!

@If(MAIL_SEND = "Y"; @If(@Prompt([YESNO];"Already Sent";"Do you want to notify assignee again?");"";@Return("")); "");
@MailSend(SendTo;CopyTo;BlindCopyTo;"PPCR" ;"";"A new PPCR is submitted.";[IncludeDoclink]);
@SetField("MAIL_SEND"; "Y");
@SetField(regHis;@Now+user);
@Command([FileSave]);
@Command([FileCloseWindow]);
@Command([OpenFrameset];"Sales")
damoncwkAsked:
Who is Participating?
 
HemanthaKumarConnect With a Mentor Commented:
Usually FileCloseWIndow triggers after all the formula is executed.

So try this

@If(MAIL_SEND = "Y"; @If(@Prompt([YESNO];"Already Sent";"Do you want to notify assignee again?");"";@Return("")); "");
@MailSend(SendTo;CopyTo;BlindCopyTo;"PPCR" ;"";"A new PPCR is submitted.";[IncludeDoclink]);
@SetField("MAIL_SEND"; "Y");
@SetField(regHis;@Now+user);
@Command([FileSave]);
@Command([FileCloseWindow]);
@POSTEDCommand([OpenFrameset];"Sales")


~Hemanth
0
 
Sjef BosmanGroupware ConsultantCommented:
Does regHis contain a value?
0
 
Sjef BosmanGroupware ConsultantCommented:
And, what's more, the expression @Now + user might be invalid. If user is a variable, then use

    @SetField("regHis"; @Text(@Now) + " " + user)
0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
damoncwkAuthor Commented:
hi,
regHis might or might not contain any value
and user is another field name
0
 
Sjef BosmanGroupware ConsultantCommented:
Did you correct the formula? I suppose the FileSave didn't work too? Is this in an agent, or where? Background? Then look in the log.nsf file for the error messages (if any).
0
 
damoncwkAuthor Commented:
Hi,
The FileSave command did work and the file is saved successully.
and in the log file there is no error message.
therefore just wonder what's happening there........oops.....
0
 
damoncwkAuthor Commented:
by the way,
it is not an agent
it is juz the formula of a button
0
 
Sjef BosmanGroupware ConsultantCommented:
What happens if you remove the FileCloseWIndow (temporarily)?
0
 
qwaleteeCommented:
Put @Prompt([OK; "@Command"; XXXXXXXXX ); before each @Command -- replace XXXXXXXX with "FileSave" "FileCloseWindow" "OpenFramSet"

See what prompt you get when you run it.
0
All Courses

From novice to tech pro — start learning today.