Help please...IncludeDoclink Query

Hi,

Im having trouble with my formula below…

At the moment the user is recieving an email but there is no “doclink” in the email.

Can anyone suggest why my user is not getting a link in the email…??

@MailSend(“user/”;“IT/company/”;“New IT Request Form”;“”;“This e-mail is for FYI purposes only.” + @NewLine + @NewLine + "Attached is a copy of a request for a proposed project from the following person: " + @NewLine + @NewLine + @Name([CN];From);[IncludeDoclink]);

@Command([FileSave]);

@Command([FileCloseWindow])

Thanking you in advance

Subject: Help please…IncludeDoclink Query

The default view may be the culprit, but you are also putting the message into the BodyFields clause of the statement instead of the Remarks, and have skipped the BCC clause:

@MailSend(“user”; “IT/company/”; “”; “New IT Request Form”; “This e-mail is for FYI purposes only.” + @NewLine + @NewLine + "Attached is a copy of a request for a proposed project from the following person: " + @NewLine + @NewLine + @Name([CN];From); “”; [IncludeDoclink]);

Subject: RE: Help please…IncludeDoclink Query

Hi

Thanks for your response.

I tried the example that you had posted and the link did not appear on the documentation. I have also modified my code a bit the following…

@MailSend(“name/IT/company”; “name/IT/company”; “”; “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])

but again the doclink still does not appear on the email. Do you have any other idea’s?

Thanking you in advance…

Subject: RE: Help please…IncludeDoclink Query

You are still missing a clause (BodyFields) between the message and the [IncludeDoclink].

Subject: RE: Help please…IncludeDoclink Query

Hi,

Thanks for your response…I have tried your example above and the link still does not appear…I have changed my code slightly to the following…and againt he doclink does not appear on the document…?

@MailSend(“username/IT/company”; “username/IT/company”; “”; “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])

Any other ideas?

Many thanks

Subject: RE: Help please…IncludeDoclink Query

I assume the plus before [IncludeDoclink] was just a typo?

The person getting the e-mail without the doclink, is it in Default font or does it appear to be in courier? I’m just curious if it has something to do with how the e-mail is arriving?

Where is this code located? Maybe the context will give us a hint? Is it a button on the form? Is the document open in edit mode? Read mode? They click on the button when they create it or at a later time?

Subject: RE: Help please…IncludeDoclink Query

Hi,

Yeah sorry the plus sign was a typo.

I have created a button called Save & Send request on the form and have put the following formula in that button.

Im sure the person getting the email is in a default font…

Im beginning to pull my hair out :o( any more ideas?

The code is…

@MailSend(“name/IT/company”; “name/IT/company”; “”; “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: “;””;[IncludeDoclink]);

@Command([FileSave]);

@Command([FileCloseWindow])

Many Thanks

Subject: RE: Help please…IncludeDoclink Query

Stan’s idea didn’t work?

Changet it to (I put in the . . . just so you can see the indenting and I wrote it this way to make it easy (IMO) to read.

@MailSend(

. . . “name/IT/company”;

. . . “name/IT/company”;

. . . “”;

. . . “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: ";

. . . [IncludeDoclink]

);

@Command([FileSave]);

@Command([FileCloseWindow])

To: “name/IT/company”;

CC: “name/IT/company”;

BCC: {no one}

Subject: “New IT Request Form”

Remark: {none}

Body: Your message

Print screen of my version of the above:

I then did a preview in notes, clicked on the button and the e-mail I got:

So it appears to work…

Subject: RE: Help please…IncludeDoclink Query

Hi,thanks for your help.

I have figured out why this is not working…

Its mainly because the form needs to be saved before the request can be sent…so if i save the form manually using ctrl + s to save the form then select the save and send button the link appears in the email.

Ive tried moving the save command in front of the mailsend code but it doesnt appear to send an email…

Do you know how I can save the form before sending the email…?

The only way I can think of doing it is by creating a save button but Id like to use fewer buttons.

Sorry to sound really dumb but I am really new to this.

Greatly appreciate the help given

Thanks

Subject: RE: Help please…IncludeDoclink Query

So it was the combination of the Save and the missing Remarks.

Yes, it’s unfortunate but you cannot assume

@Command([FileSave])

@Mailsend(…)

@PostedCommand([FileCloseWindow])

Will execute in the order written, you should look at the help and @Command, it will give you more details on this.

Here is an approach, create a computed for display text field called MailFlag (you can give it any name). I would make the formula

@If(@Thisvalue=“”;“N”;@Thisvalue);

Change your Action button to

Field MailFlag := “Y”;

@Command([FileSave]);

@Command([FileCloseWindow])

Then in the forms QuerySave event have:

@If(MailFlag = “Y”;

. . @Do(

. . . . @MailSend( with all your parameters );

. . . . @SetField(“MailFlag”;“N”)

. . );

. . “”

);

Subject: Help please…IncludeDoclink Query

make sure your database has a default view. If it doesn’t have a view marked as the ‘default’, doclinks won’t work.

Hope that helps.

Subject: RE: Help please…IncludeDoclink Query

Hi thanks for the response.

Ive tried both idea’s but I’m still getting the same problem.

If you have anymore idea’s I would greatly apreciate it.

Thanks

Subject: Help please…IncludeDoclink Query

Just as an idea - try manually saving the document before you perform the above action. I’m wondering if the problem is the fact the document hasn’t been saved before the mailsend is performed.