Understanding URL Parameters and Key Values in Sage CRM

11 minute read time.

In Sage CRM, every screen is generated as the result of a hyperlink request. This may occur when a user selects a tab, clicks a button, opens a record from the Recent List, or follows a link from a list or dashboard gadget.

The URL passed to eware.dll contains a series of name/value pairs that define the context, action, and behaviour of the requested page.

A typical Sage CRM URL might look like this:

http://localhost/CRM/eware.dll/Do?SID=198369875659391&Act=281&Mode=1&CLk=T&Key0=8&Key1=43&Key2=57&Key8=46&T=Case
The most important elements of the URL are:
  • SID (Session ID)
  • Act (Action Code)
  • Mode
  • CLk (Clear Locks)
  • Key Values (Contextual Information)
  • Custom Jump Parameters

This document explains the purpose of these parameters and how they are used within Sage CRM customizations.

URL Processing in Sage CRM

Sage CRM screens are generally requested using the HTTP GET method.

Forms within Sage CRM are typically named EntryForm and are submitted using the HTTP POST method. By default, a form submission recalls the same page after processing.

This distinction between GET and POST is important when developing ASP pages or creating advanced customizations.

For example:

  • Hyperlinks and tab navigation use GET
  • Save, Change, Delete, and Filter operations use POST

Although action buttons appear to be standard HTML buttons, they are often implemented internally as hyperlinks that execute JavaScript such as:

document.EntryForm.submit();

SID (Session ID)

The SID parameter contains the current user session identifier.

Example:

SID=198369875659391
The Session ID is created when the user logs in and is used to maintain the authenticated session throughout Sage CRM.

No Sage CRM URL is valid without a valid Session ID.

Act (Action Code)

The Act parameter identifies the internal Sage CRM action required to build the requested screen.

Example:

Act=281
The Action Code determines which server-side process is executed by eware.dll. The resulting page may be assembled from:
  • Metadata blocks
  • ASP pages
  • Internal CRM components
  • Hardcoded behaviours

Many screens are built from a mixture of metadata-driven and internally coded components.

For example:

Action Example Act Code
Company Summary Screen 200
Company Change Screen 201
Company Delete 202
Recent List Navigation 520

The value of Act can be used in customizations to determine how a page was reached.

For example:

Valid = false;
ErrorStr = Values('Act');

If this code is placed within an onCreate script, the current Action Code will be displayed.

Mode

The Mode parameter does not represent the visual mode of the screen.

Although developers often associate "mode" with the eWare.Mode property used in ASP pages, the Mode value in the URL instead represents a secondary processing action that the DLL must perform.

Example:

Mode=1

Common values include:

Mode Meaning
1 Setup / Initialise
2 Search
3 Save
4 Run / Execute
6 Clear

Some screens define additional custom modes.

For example, the Groups screen uses:

Mode Meaning
100 Insert
200 Update

In most custom development scenarios, it is unusual to manually define Mode values in URLs.

CLk (Clear Locks)

The CLk parameter controls record lock handling.

Example:

CLk=T

When CLk=T is present, Sage CRM clears any existing record locks associated with the current session when navigating away from the screen.

This prevents unnecessary locks remaining active.

Key Values

Key Values provide contextual information to Sage CRM.

Example:

&Key0=1&Key1=28&Key2=30

These values define the records and entities currently in context.

For example:

Parameter Meaning
Key0 Current entity in context
Key1 Company ID
Key2 Person ID

Using the standard demonstration data:

  • Key1=28 may refer to the company "Gatecom"
  • Key2=30 may refer to the person "Simon Yaltoy"

The current context is therefore Company = Gatecom and Person = Simon Yaltoy.

Dominant and Previous Keys

The following special keys define navigation context:

Key Meaning
Key-1 Previous dominant entity
Key0 Current dominant entity

These values help Sage CRM maintain navigation context while moving between screens.

Common Key Values

The following table lists commonly used Key Values in Sage CRM.

Key Name
0 DominantKey
1 CompanyId
2 PersonId
3 AddressId
4 UserId
5 ChannelId
6 CommunicationId
7 OpportunityId
8 CaseId
9 NoteId
10 TeamId
15 LibraryId
16 ProductId
17 CaseProgressId
18 OpportunityProgressId
24 AccountId
25 TargetListId
27 WorkflowRuleId
28 WorkflowActionId
31 VisitorId
33 CampaignId
41 ReportId
44 LeadId
46 WorkflowStateId
54 TerritoryId
58 CustomEntity
61 GenericPage
66 BusinessCalendarId
68 SolutionsId
71 OrderID
73 ForecastHistoryID
75 SLAId
78 NotificationId
81 AdvancedFindID
86 QuoteID
96 EmarketingCampaignId
98 SmartUIEntityId
99 SmartUIRecordId
120 CustomPage
126 ConsentManagementId

Some keys are historical or integration-specific and may only be used by particular features.

Custom Jump Parameters

Custom ASP pages often use additional URL parameters to control navigation and context.

Example:

http://localhost/crm/CustomPages/userlicensekeylist.asp?SID=176991466128834&Key0=4&Key4=1&J=userlicensekeylist.asp&F=Welcome&E=LicenseKey&T=User

The additional parameters are:

Parameter Meaning
J Target page
F Source or originating page
E Target entity
T Default tab group

These values are commonly used in custom applications and integrations.

Detecting How a Page Was Called

When customizing Sage CRM, it is often useful to determine whether a page was opened:

  • Directly through navigation
  • Via a form submission
  • From the Recent List
  • Through a button click

ASP Pages

In ASP pages, the HTTP method can be checked using:

Request.ServerVariables("HTTP_METHOD")

Typical values are:

Method Meaning
GET Hyperlink navigation
POST Form submission

The eWare.Mode property may also be available.

System Pages and Metadata Scripts

System-generated pages do not provide direct access to Request.ServerVariables.

However, within metadata scripts such as:

  • Create Scripts
  • Custom Content
  • Field Scripts

you can access URL values using the Values() collection.

Example:

Values('Act')

This technique is especially useful in onCreate scripts.

Note:

The Values() collection only exposes QueryString values during onCreate processing. It is not available in:

  • Table Level Scripts
  • Validation Scripts

Using Act Codes in Customizations

Because Action Codes vary depending on how a screen was reached, developers can use them to alter behaviour dynamically.

For example:

Action Act Value
Company Summary from tab 200
Company Summary from Recent List 520
Return from Change screen 201
Delete operation 202

This allows custom scripts to:

  • Change captions
  • Alter behaviour
  • Display warnings
  • Redirect logic
  • Suppress functionality

depending on the navigation source.

Client-Side Techniques

The Custom Content area supports client-side scripting.

This allows use of browser properties such as:

document.referrer
document.URL

These techniques can be useful for advanced navigation handling and context-aware customizations.

Notes

  • Some Key Values are legacy values retained for compatibility.
  • Certain keys are specific to integrations such as Exchange Integration, Mailchimp, or SData.
  • Not all keys are used in every implementation.
  • Sage CRM internally maintains navigation context using these values throughout the application lifecycle.

Understanding URL parameters and Key Values is fundamental when developing Sage CRM customizations, integrations, and ASP extensions.