Hyperlink in Outlook to Navision Form/Record

ColloCollo Member Posts: 12
Hi

What I'm trying to do it embed a hyperlink in and outlook email to a purchase order in navision.

I have managed to change the format of the email to HTML and have replaced spaces '\' and '&' from the url


CR:=13;
LF:=10;
CRLF := CRLF+ FORMAT(LF);
ReplaceTextInString(' ','%20',TextURL);
ReplaceTextInString('\','%5C',TextURL);
ReplaceTextInString('&','%26',TextURL);
BodyText := TextURL + CRLF;

I have also prefixed my url with string 'url:'

All works fine however outlook does not recognize this as a hyperlink unless I review the email and press Return after the url so that outlook does a autoformat and turns it blue and underlines it (recognized it as a hyperlink).

I know I can embed the link as an attachement but the customer does not want this.

Is there any way I can make outlook recognize the link automatically as I do not want to review the email before sending???

Any Ideas??? ](*,)

Comments

  • kinekine Member Posts: 12,562
    1) Check in which format the mail is sent. if it is plain text mail, you cannot use hyperlinks
    2) You can use SMTP to send the mail and in this case you can set in which format the mail will be send (HTML or plain text). After that you can use HTML tags...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ColloCollo Member Posts: 12
    I am using outlook and I have Set the email to HTML format, not plain text. Still doesn't recognise the Hyperlink.
    ](*,)
  • kinekine Member Posts: 12,562
    I am not using outlook for sending HTML mails from NAV, it is why I have no more what to add... :-k
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • venus1022venus1022 Member Posts: 13
    Did anyone ever find an answer to creating a hyperlink in an outlook email to a navision form?
  • NostaNosta Member Posts: 31
    Do you mean something like this:
    create(out);
    mail := out.CreateItem(0);
    mail.BodyFormat(2);
    mail.display;
    mail.HTMLbody :=
    '<HTML><BODY>Here is a link to the Purchase Order form: <a href="navision://client/run?target=Form 50">NAV</a> </BODY></HTML>';
    
    ?
    where:
    out - Automation: 'Microsoft Outlook 12.0 Object Library'.Application
    mail - Automation: 'Microsoft Outlook 12.0 Object Library'.MailItem

    br/Gennadii
Sign In or Register to comment.