What is new syntax for URL on start page to open an order

Discussions related to custom development with Select.
Post Reply
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

What is new syntax for URL on start page to open an order

Post by joe.mag »

In 2.6 placing a link on a custom start page such as

Code: Select all

<a href=\"javascript:openOrder('sp-select:///ordertracking/order?id=<Order's GUID goes here);"> click here </a>
would allow you to open an order. It appears this is no longer the case. I realize RootId# likely replaces the Order's GUID but what should the syntax of the javascript be?

The SDK mentions this briefly but with insufficient detail to enable me to get it to work. For example, what moniker would one use here:

Code: Select all

window.external.OpenDocument(moniker);
I don't want to be limited to items in the MRU.
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: What is new syntax for URL on start page to open an orde

Post by John Morris »

Try this format:

Code: Select all

sp-select://./ordertracking/order?id=<guid-goes-here>
Like this:

Code: Select all

sp-select://./ordertracking/order?id=fc09eb99-a730-e511-828a-0002723f83ef
John Morris
Sr. Software Architect
SoftPro
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: What is new syntax for URL on start page to open an orde

Post by joe.mag »

John, Thanks for the response.

Perhaps I'm just being dense but I thought in 3.0/4.0 Orders used the int Id# field in place of a GUID?

Also, how would I enclose your provided sample code on the actual HTML page?

Like this:

Code: Select all

<a href="javascript:openOrder('sp-select://./ordertracking/order?id=c2b3137e-c035-4257-ad7b-859f29c39389');"> click here </a>

or like this:

Code: Select all

<a href="javascript:window.external.OpenDocument("openOrder('sp-select://./ordertracking/order?id=1e398603-4238-4c7c-b159-359040053125')")"> click here </a>
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: What is new syntax for URL on start page to open an orde

Post by John Morris »

Orders still have a GUID that uniquely identifies them. That hasn't changed. The RootID is only used internally within the db for foreign keys (ints are smaller than guids, it is a performance trick). From an API point of view, you should ignore the RootID concept. It only applies at the db level. For example, it is used in direct SQL or Crystal Reports.

You should use this fragment, in the start page:

Code: Select all

<a href="javascript:window.external.OpenDocument('sp-select://./ordertracking/order?id=1e398603-4238-4c7c-b159-359040053125');"> click here </a>
John Morris
Sr. Software Architect
SoftPro
Post Reply