Link to home
Start Free TrialLog in
Avatar of damoncwk
damoncwk

asked on

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")
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Does regHis contain a value?
And, what's more, the expression @Now + user might be invalid. If user is a variable, then use

    @SetField("regHis"; @Text(@Now) + " " + user)
Avatar of damoncwk
damoncwk

ASKER

hi,
regHis might or might not contain any value
and user is another field name
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).
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.....
by the way,
it is not an agent
it is juz the formula of a button
What happens if you remove the FileCloseWIndow (temporarily)?
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Put @Prompt([OK; "@Command"; XXXXXXXXX ); before each @Command -- replace XXXXXXXX with "FileSave" "FileCloseWindow" "OpenFramSet"

See what prompt you get when you run it.