Solved

somes codes are executed while some are not

Posted on 2004-04-29
7
213 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
  • 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now