Solved

somes codes are executed while some are not

Posted on 2004-04-29
7
217 Views
Last Modified: 2013-12-18
Hi,
I use the following formula for a button
however only the mailsend line is executed
all other fields keep their original content rather than the assigned one from the
following codes. I guess it does not matter with the type of the
fields since I can set the field contents of same fields using same codes
for another button.
Any clues?
thanks!!!

FIELD bstatus :="approved";
FIELD status := "Registered";
@MailSend(user;ITuser;"";"Your PPCR is approved" ;"";"Your PPCR is approved.";[IncludeDoclink]);
@SetField("MAIL_SEND"; "Y");
FIELD regHis :=  "On " + @Text(@Now) + ", " + @Name([CN];@UserName);
FIELD regStatus :=  "On " + @Text(@Now) +",  " + @Name([CN];@UserName);
@Command([FileSave]);
@PostedCommand([OpenFrameset];"Sales")
0
Comment
Question by:damoncwk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10946899
Are these fields computed or computed for display type? That may be the case.
0
 

Author Comment

by:damoncwk
ID: 10947006
Hi,
They are all editable fields.

I have tried something different and noted that
if I add a text field A beside the button

the button will set the content of field B to be that of field A
If i fill in field A then in addition to the mail being sent out
field B is also set to the value of field A.
If I delete field A and the button set
the content of B to some hardcoded string then
only the mail is sent out but the content of field B remains its original value.
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 10947164
The document has been saved already, before sending the mail ?

I've pasted this code in a test appl.  and for me, it works fine (except that I can't open the frameset, of course)
I do have some problems getting the mail delivered : this only works if I save the document first ....

If you use R6, you can detect an error in the mailsend command like this :
@iferror(@MailSend(user;ITuser;"";"Your PPCR is approved" ;"";"Your PPCR is approved.";[IncludeDoclink]);@return( @prompt([ok];"error";"Error sending mail"));

Maybe change @command([filesave]) to @postedcommand([filesave]) ?

cheers,

Tom
0
Technology Partners: 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!

 

Author Comment

by:damoncwk
ID: 10956810
I still encounter the same problem even if I create a new
button and paste the code to the new button.
is there any possible causes?
Thanks!
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 10957011
Yes, there are possible causes :

- the value of the fields is changed somewhere else (querysave event, field translation, computed fields)
- the user can't edit the document (rights ?)
- the document is not in Edit mode

cheers,

Tom
0
 

Author Comment

by:damoncwk
ID: 10958124
Hi Tom,
How can I set a form in edit mode when I open it from a document link in mail
or from a view?
Basically i want to open it in edit mode based on the user role.

Thanks.
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 125 total points
ID: 10959522
Is it on web or client?

In client,use PostOpen event to execute a UIDOC.EditMode = True

Further, to cause a document to automatically open in edit mode unconditionally, you can set it form property "Automatically enable edit mode" on the second tab of form properties. But be warned that will not perform any role testing. To test for the role you can consider writing a function.

If it is for web, you can use the EditDocument URL command. The syntax is: http://Host/Database/View/Document?EditDocument 
0

Featured Post

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Domino Server 11 76
Migration Lotus to Exchange 2016 4 221
DIIOP IP Addresses Changes Automatically 5 103
Split Domain with Lotus Domino and Zimbra mail server. 5 268
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question