Ok this is doing my head in :o(

Hi,

I sort of have my @mailsend command working…

When I say sort of…if i use the following command…

@MailSend(“Stabilio/IT/blah”; “Genuis/IT/blah”; “”; “New IT Request Form”; “This e-mail is for FYI purposes only.” + @NewLine + @NewLine + "Attached is a link with a copy of a new project request from the following person: " + @UserName;[IncludeDoclink]);

@Command([FileSave]);

@Command([FileCloseWindow])

i recieve an email without the link to the form…

If i insert the bodyfields “” bit into my code like so…

@MailSend(“Stabilio/IT/blah”; “Genuis/IT/blah”; “”; “New IT Request Form”; “This e-mail is for FYI purposes only.” + @NewLine + @NewLine + "Attached is a link with a copy of a new project request from the following person: " + @UserName; “”; [IncludeDoclink]);

@Command([FileSave]);

@Command([FileCloseWindow])

I dont seem to recieve anything.

Can anyone please help me…I feel like im going to be pulling my hair out soon!

Thanking you in advance

Subject: Ok this is doing my head in :o(…

Stabilo try

@MailSend(“Stabilio/IT/blah”; “Genuis/IT/blah”; “”; “New IT Request Form”; “”; “This e-mail is for FYI purposes only.” + @NewLine + @NewLine + "Attached is a link with a copy of a new project request from the following person: " + @UserName;[IncludeDoclink]);

I think you were missing the remark parameter

HTH

John

Subject: RE: Ok this is doing my head in :o(…

The “remark” parameter is the body of the mail message. “BodyFields” is used to include data from the current document – you tell Notes which fields to include, and it renders the fields to the mail message AFTER the body text you created in the remark. When you use [IncludeDoclink], you have to leave BodyFields empty.

Subject: RE: Ok this is doing my head in :o(…

Hi.

Thanks for the response.

I have tried what you have given me but Im not recieving an email at all…

Any other ideas?

Thanking you in advance

Subject: RE: Ok this is doing my head in :o(…

Sorry just tested that code again and it works fine for me - sure there are no typos in your addresses can’t think of anything else

Subject: RE: Ok this is doing my head in :o(…

Found this:http://www.etf.europa.eu/help/help65_designer.nsf/f4b82fbb75e942a6852566ac0037f284/a3c0d21bdfab8b7685256e000049c318?OpenDocument

Where it describes the “bodyFields” parameter it states:

When you use the [IncludeDocLink] flag (described below) to include a link to the current document, you should set the bodyFields parameter to null (“”). If Notes/Domino cannot locate a field by name, it uses the string literal instead.

Try this and see if you get the link…

HTH

Ads

Subject: Ok this is doing my head in :o(…

I tend to set these types of formulas up like this - This is a working formula -which is to say I get the doc link & there is obviously all sorts of stuff in the e-mail. This was a formula that I ulimately wrote in script as it was easier w/ the more info I put in. TomSendto := Interviewers;

Blindcopyto := “Bugs Bunny/MyCompany”;

Subject := "Hiring interviews needed for " + Position;

Remark := "Status of " + Position + " is " + Flow;

BodyFields1 := "Please set up an interview with " + PrefFname + " " + Lname + “.” + @NewLine;

BodyFields2 := "Contact Information: Home Phone - " + HomePhone + " or " + CellPhone + “.”+ @NewLine;

BodyFields3 := "The key contact for this position is: " + @Name([CN];PosSuper) + @NewLine;

“Send Code Begins here”;

@MailSend(Sendto;CopyTo;BlindCopyTo;Subject;Remark;BodyFields1:BodyFields2:BodyFields3;[IncludeDoclink])

Subject: Ok this is doing my head in :o(…

Are you saving this document elsewhere prior to performing an @mailsend? If not, I don’t believe a doclink can exist.

Subject: Ok this is doing my head in :o(…

Also…from my understanding a document has to be saved before the email can get sent?

So I have even tried the following…

@If(@IsDocBeingSaved&@IsNewDoc;@MailSend(“s/IT/blah”; “g/IT/blah”; “”; “New IT Request Form”; “This e-mail is for FYI purposes only.” + @NewLine + @NewLine + “Attached is a link with a copy of a new project request from the following person: " + @UserName; “”; [IncludeDoclink]);”");

@Command([FileSave]);

@Command([FileCloseWindow])

Thanks

Subject: What was the fix you found in the end? EOM

Subject: RE: What was the fix you found in the end? EOM

Hi,

Well I didnt do much…the code I had done previously was fine…I just set a default form and view, tested it and it appeared to work fine :o\

Thanks again to everyone who helped though, really appreciate it :o)

Subject: Ok this is doing my head in :o(…

Hey,

Thanks for all your responses…

Ive tried all your sugestions and nothing appears to work…

Ive been looking into this and came across a page that says…

"Another developer here found out why the @MailSend does not work in R6. It was a problem in R4 corrected in R5 but does not work in R6. In order for @MailSend to work in an Action Button, you must have a defalut form and a default view selected. If either of these is not selected, the @MailSend will not work. "

If this is true…can anyone tell me what to do…?

Is it a case of just creating a blank form and view?

Thanking you in advance

Subject: RE: Ok this is doing my head in :o(…

No- just pick a form and view in the database and mark it as the default in the properties- remember that the default form is what gets opened when the form defined by the field “Form” cannot be found- so, pick a form that might make sense.

Subject: Ok this is doing my head in :o(…

Woohoo! Ive fixed it!!

Thank you all for your help