Solved

somes codes are executed while some are not

Posted on 2004-04-29
7
216 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
msxml3.dll: Not enough storage is available to complete this operation 13 923
Missing Rules 1 307
Username format for Domino LDAP 3 102
ESXCLI upgrade command 1 117
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.

831 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