Jaa


Creating and Running Hyperlinks

In the developer help for NAV 2009 (nav_adg.chm), there is a description for creating and running Hyperlinks - I will not try to repeat all the information in the documentation - so please read the documentation before reading this post.

There are however a couple of thing, which are not described in detail.

My next post is about the Search demo, which was shown at Convergence yesterday (Partner day) - I will describe how this demo is done, in a 2 step walkthrough (first is to get it to work on all operating systems and second is to make it work as a Windows Vista Gadget - stay tuned)

Bookmark

Bookmark

This positions the cursor on a single record in a table.

Only automatically generated bookmarks should be used. If you enter an incorrect bookmark, you will get an error message.

dynamicsnav://localhost/DynamicsNAV/CRONUS International Ltd./runpage?page=22&bookmark=120000000089083237343

But how do you get your hands on this automatically generated bookmark?

It is actually described in another section of the documentation - Walkthrough: Creating a Link in a Report.

FORMAT(RecordRef.RECORDID,0,10)

The usage of value 10 in this expression is a RoleTailored client feature only that will format RECORDID into a text representation that is compatible with the URL handler of reports and pages. Note that this function only works if ISSERVICETIER = TRUE - if you run a code unit in the classic client, trying to use the FORMAT(xx,0,10) it will not return a bookmark for the Role Tailored Client.

Personalization ID

Personalization ID

This is the unique identification used in personalization to store settings in the User Metadata table. If a personalization ID is not found, the page is launched without personalization.

dynamicsnav://localhost/DynamicsNAV/CRONUS International Ltd./runpage?page=22&personalization=0000232e-0000-001a-0008-0000836bd2d2

What is this personalization ID and how do you get to that?

The Personalization ID is the way we distinguish the different views of things like the Sales Order List View. In Susans Role Center, there are 6 List Places, which all use the same underlying List Place (9305)

image

In fact, this is the reason for these List Places to be grouped together - that they have a common page number, and if we didn't have the personalization ID, all these list places would share personalization - and in a Role Tailored User Experience, there are differences in which actions you typically would promote in a list place with shipped not invoices sales orders and a list place with ready to ship sales orders.

BTW - if you wonder where the last 4 come from - the are auto generated from the stacks in Susans Activities - and the reason for this is, that in order for navigation to work, we need to have a node in the navigation pane for every possible list place we can have in the navigation area.

The Personalization ID for these views are:

Sales Orders 0000232E-0000-0002-0008-0000836BD2D2
Shipped Not Invoiced 0000232E-0000-0007-0008-0000836BD2D2
Sales Orders - Open 00002364-0000-0006-0008-0000836BD2D2
Ready to Ship 00002364-0000-000C-0008-0000836BD2D2
Partially Shipped 00002364-0000-000B-0008-0000836BD2D2
Delayed 00002364-0000-000A-0008-0000836BD2D2

and how in earth did I find these ID´s?

Simple enogh - In a VPC, Classic Client I open the User Personalization table. Then I personalize these list places one after the other, and every time I have personalized a list place I refresh my table view and a new record pops up:

image 

Sorted by Personalization ID.

For Task Pages - the personalization ID will typically just be the same as the Page ID.

But what can you use this for?

Very little as the matter of fact - if you launch a RunPage url with a list place as paramter, the list place will open as a task page, so you will need to specify which personalization you want - else you will create a personalization set with the same ID as the list place (9305 in this case). The personalizations stored under this personalization ID will never be used by the RTC (unless you launch that URL again), since we always specify the above ID's.

So you should think that the following URL

"DynamicsNAV:////CRONUS International Ltd./RunPage?Page=9305&personalization=0000232E-0000-0007-0008-0000836BD2D2"

would open the Shipped Not Invoiced List Place in a Task Page.

That is unfortunately only partially true - you will open a Task Page with a List of Sales Orders and the Personalizations in this list are Shipped Not Invoiced - but you will NOT inherit the filters from Shipped Not Invoiced and the caption is also not what you would expect.

So now told what the personalization ID is and how to use it, but I am afraid it is only for limited usage right now.

If you want to launch a listplace you need to do like:

"DynamicsNAV:////CRONUS International Ltd./navigate?node=Home/Sales Orders/Ready to Ship"

Only problem with this URL is, that it always opens a new Client (eating one extra license).

I will investigate whether there are other ways of getting to a list place with filters and personalization - but for now, don't specify pesonalization ID when launching pages via URL's unless you have a good reason for doing so.

Enjoy

Freddy Kristiansen PM Architect
Microsoft Dynamics NAV

Comments

  • Anonymous
    November 18, 2008
    Freddy, thanks for this. I've just spent hours working on this URL stuff. I piigybacked the change log and did some changes to the "My notifications" so that users get notified on I/M/D of records. I could get the notification to appear in the RC home, but not the URL to work. The page would come up but not the record in question. What a coincidence you posted this today! Its 1am here and I've been working on this all night. Can you let me know what else we can call on the Protocol DynamicsNav:/// I see there is Runpage? and Navigate? is there any others? Thanks again! t

  • Anonymous
    November 19, 2008
    Have you checked the developer documentation I mention in the beginning - it describes pretty well what can be done and what not. In this post I only explain a little deeper about some of the things that isn't described to full detail. I just tried to add a note to a customer and look in the Record Links Table - and URL1 is: dynamicsnav://localhost:7046/DynamicsNAV/CRONUS%20International%20Ltd./runpage?page=21&personalization=21&bookmark=224;EgAAAACJCDM1OTYzODUy&mode=Edit Which I can run and that takes me directly to the right customer TaskPage - isn't that what you are trying to do?

  • Anonymous
    November 20, 2008
    Hi Freddy, I read your recommended Documentation. Yes, I have the hyperlink construction working perfectly. Perhaps I didn't pose my question correctly hence the confusion. Regardless, the information I was looking for is actually well explained in the documentation "Creating and Running Hyperlinks" The answer was : Runpage?page=<pageid> Runreport?report=<reportid> navigate?node=<node> There are no more than those 3. Thanks for the reply anyway! t

  • Anonymous
    July 21, 2010
    I am trying to run a report with hyperlink and fill out some parameters and I have problem to pass value in Date Filter. I will give you an example: &filter=vendor.%22Date Filter%22=010710..300710 What is wrong?

  • Anonymous
    September 16, 2010
    Hi, i saw also the parameter "position" but i don't understand exactly it's syntax. A common way to use it is: "position=Field1=0(Field1_value)", but what is the meaning of the character "0"  outside the brackets? Thank you for any reply

  • Anonymous
    May 07, 2013
    Hi Freddy, Do you know of a way to generate this Bookmark from C# (If I know the Table No and the primary key)?

  • Anonymous
    May 14, 2013
    Hi Freddy, Same Question: Do you know of a way to generate this Bookmark from C#? E.G. Item with No.=1000

  • Anonymous
    February 04, 2014
    There is a .Net and a COM API for creating bookmarks here: morenav.com/nav-start-assembly-api Regards, Jacob