PUBLIC STRING FUNCTION GetDocObjectLink (INTEGER targetobjid)
Description
GetDocObjectLink returns the hyperlink to the DocObject with ID = targetobjid. By default the function returns a relative link. If you want the function to return an absolute link, use the SetAbsoluteLinks function, or use the MakeDocObjectLink function.
Parameters
targetobjid
ID of the docobject to link to
Returns
A properly encoded hyperlink to the requested docobject
Example
// print the relative link to the DocObject with ID=3
Print ( GetDocObjectLink(3) );
// print the relative URL to the first DocObject on the first page
RECORD FirstPage := FindPage(1);
INTEGER firstobjectid := FirstPage.FirstDocObject;
Print ( GetDocObjectLink(firstobjectid) );
// print the absolute URL to the first DocObject on the first page
SetAbsoluteLinks(TRUE);
RECORD FirstPage := FindPage(1);
INTEGER firstobjectid := FirstPage.FirstDocObject;
Print ( GetDocObjectLink(firstobjectid) );