link by email

hi

anybody know how I can use native Navisions “Link bu E-Mail” function via C/AL code.

I write function for automatic sending email and I need to send some reports url as attachement(i.e same as doing by selecting File->Send->Link by Email).
My customer would like the link to open up Navision and pull open a specific document.

any assistance are welcome

Samson

Hi Samson,

I sent a link to my desktop and modified it.

Have a look:-

Original: (Item 1000)

navision://client/run?database=c:%5Cprogram%20files%5Cmicrosoft%20business%20solutions-navision400sp1%5Cclient%5Cdatabase.fdb%26company=CRONUS%20New%20Zealand%20Ltd.%26target=Form%2030%26view=SORTING(Field1)%26position=Field1=0(1000)%26servertype=NAVISION

Modified: (Customer 49525252)

navision://client/run?database=c:%5Cprogram%20files%5Cmicrosoft%20business%20solutions-navision400sp1%5Cclient%5Cdatabase.fdb%26company=CRONUS%20New%20Zealand%20Ltd.%26target=Form%2021%26view=SORTING(Field1)%26position=Field1=0(49525252)%26servertype=NAVISION

You may have to change database= to server= But you can play with that by yourself. Select a record, then click “Send->Link to desktop” Look at the properties of the Shortcut on yourdesk top.

If you look at what I modified you’ll see that the Orange background Blue font is the Form ID and the Blue background Orange font is the Value from Field1 (Primary key)

Try creating a Static String and changing these values in the email you send.

You might have to look into different sort orders and Multiple Field Primary Indexes, but now you know how to find out the String I’m sure you can continue from there.

Hope this helps

Tony

Hi Tony,

thank u, I knew about this string,

but I search easy solution to make this string automaticaly, not manually.

Samson

I think in OOP terms they call it a Static. That is it never changes. All you need to do is create 3 Text Constants and add them together, with your extra bits in between. (Form Id, Primary Index Value)

I would say use 1 string and %1 etc… but that won’t work in this case [:)]