Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

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")
0
damoncwk
Asked:
damoncwk
1 Solution
 
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
 
damoncwkAuthor Commented:
hi,
regHis might or might not contain any value
and user is another field name
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
HemanthaKumarCommented:
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
 
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now