Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • 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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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