Develop > Tailoring > Web tier > Generating Web tier URL queries

Generating Web tier URL queries

If you have installed a Web tier, you can have Service Manager server generate URL queries to your Web tier that display specific records in your applications. You can use these generated URL queries to programmatically send links to your users when records are opened, updated, or closed. Service Manager offers the following out-of-box methods for generating valid Web tier URL queries.

  • Create custom JavaScript that uses the makeSCWebURL method. You can invoke your custom JavaScript from a macro or RAD expression.
  • Create custom notification records that use the Web tier URLs defined in the system information record.

When a user clicks on a generated URL query (link), Service Manager requires the user to log in before displaying the requested data, although the user can bypass the login screen if you have enable trusted sign-on on the Web tier.

By default, the Service Manager server secures Web tier URL queries by including a unique hash key in the URL. This unique key prevents people from modifying the URL and attempting to access restricted parts of your system. If the URL query does not match the unique hash key, Service Manager displays a warning message in the log file.

If you want to generate URL queries outside of Service Manager you can disable the unique hash key using the querysecurity parameter. Disabling this parameter in the Service Manager initialization file allows the server to accept URL queries without a unique hash key. If you disable the security hash, access to tables is controlled by the Document Engine. To restrict access to tables through the Document Engine, you must enable security features such as format control or application profiles that restrict access at the operator level.

Web tier URL format

Service Manager requires generated web tier URLs to use the following format.

http://myserver.mydomain.com:myport/SM/index.do?ctx=docEngine
&file=incidents&query=incident.id=%22SD1001%22
&queryHash=89472347&action=&title=Interaction%20;SD1001
URL portion Required? Description
http://myserver.mydomain.com:myport/SM/index.do Yes This portion of the URL specifies the web tier host name, port, and web client connection to use. Use index.do to have users connect to the standard web client. Use ess.do to have users connect to the self-service web client.
ctx=docEngine Yes This portion of the URL specifies that Service Manager use the Document Engine to fulfill the query.
&file=incidents Yes This portion of the URL specifies the table you want to query for records. You must use the file name for the table as specified in the database dictionary.
&query=incident.id=%22SD1001%22 Yes This portion of the URL specifies the Service Manager query you want to use to search for records. You must URI encode the query string to prevent special characters from invalidating the URL. For example, use %22 instead of quotation marks.
&queryHash=89472347 No This portion of the URL specifies the optional hash key used to encode the URL query. The hash key prevents users from modifying the URL query to view other portions of Service Manager. You can only include a hash key if you generate the URL from the makeSCWebURL method.
&action= No This portion of the URL specifies the Document Engine action you want the URL query to perform. By default, the URL query performs a search operation.
&title=Interaction%20;SD1001 No This portion of the URL specifies the optional title of the query. You must URI encode the query string to prevent special characters from invalidating the URL. For example, use %20; instead of a space.