Understanding Key Values and URL variables

4 minute read time.

This article is based on previous articles and expands the information available.

A screen is called as a result of a hyperlink. This may be a button click, a call from the recent list or any other selection from the interface.

A URL of a Case's Summary Screen will look something like this:

http://[server]/[installname]/eware.dll/Do?SID=198369875659391 &Act=281 &Mode=1 &CLk=T &Key0=8 &Key1=43 &Key2=57 &Key8=46 &T=Case

The URL contains a set of name/value pairs which are passed to the eware.dll to create the screen. The most important elements are the

  • SID (Session ID)
  • Act (Action Code)
  • Mode
  • CLk (Clear Locks)
  • Key Values (Contextual Information)
  • Custom Jump Values

SID (Session ID)
The Session ID is created at login is used to maintain the user session. No Sage CRM URL is valid without a valid SID.

Act (Action Code)
Several articles have been written that explore the way in which the "Act" code or System Action can be used.

Mode
The Mode in the context of CRM is usually used to describe whether a screen is in Edit Mode or in View Mode. You may find yourself thinking about the eWare.Mode property that is used in ASP pages. BUT in a URL the Mode element of the QueryString doesn't represent the 'Screen Mode'.

Instead, the Mode in the querystring refers to a secondary action that the dll needs to carry out. There are some common ones like:

  • 1 = Setup/Initialise
  • 2 = Search
  • 3 = Save
  • 4 = Run/Execute
  • 6 = Clear

which are used by most screens. Some screens have also defined special modes for themselves. For example, on the Groups screen, we use Mode 100 when inserting, and Mode 200 when updating.

Note
It is very rare that when developing a customized application extension you will need to define Mode in the URL.

CLk (Clear Locks)
When set to CLk=T this will ensure that record locks associated with this session are cleared. This means that when navigating away from screens locks are not kept open.

Custom Jump Values

If we consider the following URL
http://[server]/[installname]/CustomPages/userlicensekeylist.asp?SID=176991466128834 &Key0=4 &Key4=1 &J=userlicensekeylist.asp &F=Welcome &E=LicenseKey &T=User

  • J is the target page for the URL
  • F is the original context (or page)
  • E is the target Entity
  • T is the default tabgroup
  • key-1 (not used above) indicates the previous entity in context.

Key Values (Contextual Information)


Consider this partial URL from the Summary tab of the Company context.

... &act=200 &key0=1 &key1=28 &key2=30...

The keys can be read to understand

Key0 = current entity in context
Key1 = company unique id
Key2 = person unique id

So assuming we are working with the standard demo data then we are currently looking at Gatecom and Simon Yaltoy.

But what are the other keys that you may see used in URLs?

Here then is the list.

PreviousDominantKey = -1;
DominantKey = 0;
CompanyId = 1; //current company
PersonId = 2; //person we are CURRENTLY viewing
AddressId = 3; //address we are currently EDITING
UserId = 4; //user for which we are viewing the todo lists
ChannelId = 5; //Team for which we are viewing Team lists
CommunicationId = 6;
OpportunityId = 7;
CaseId = 8;
NoteId = 9;
TeamId = 10;
UserAdminId = 11;
ChannelAdminId = 12;
LockId = 13;
TranslationId = 14;
LibraryId = 15;
ProductId = 16;
CaseProgressId = 17;
OpportunityProgressId = 18;
CompanySearchKey = 19;
PersonSearchKey = 20;
OpportunitySearchKey = 21;
CaseSearchKey = 22;
CommSearchKey = 23;
AccountId = 24;
TargetListId = 25;
OpportunityItemId = 26;
WorkflowRuleId = 27;
WorkflowActionId = 28;
CustomDatabase = 29;
CustomTable = 30;
VisitorId = 31;
UserPrefId = 32;
CampaignId = 33;
WaveId = 34;
WaveItemId = 35;
RecurrenceId = 36;
ForeignTableId = 37;
DataUploadId = 38;
MatchRulesId = 39;
CurrencyAdminId = 40;
ReportId = 41;
ComponentId = 42;
ComponentScriptId = 43;
LeadId = 44;
LeadSearchKey = 45;
WorkflowStateId = 46;
MainWorkflowId = 47;
HelpLinkId = 48;
TransitionId = 49;
InstanceId = 50;
TerritoryId = 54;
LeadProgressId = 55;
LeadOppoMapId = 56;
RuleManagement = 57;
CustomEntity = 58;
TerritoryProfileId = 59;
FilterProfileId = 60;
GenericPage = 61;
ReportSearchID = 62;
CallID = 63;
ForecastID = 64;
CustomViewID = 65;
BusinessCalendarId = 66;
HolidaySetId = 67;
SolutionsId = 68;
SolutionSearchKey = 69;
SolutionProgressId = 70;
OrderID = 71;
LineItemID = 72;
ForecastHistoryID = 73;
SLAId = 75;
OEAdmin = 76;
OEAdminSub = 77;
NotificationId = 78;
PwdSecurID = 79;
ReportFavouriteID = 80;
AdvancedFindID = 81;
KeyWordSearchID = 82;
AccountSearchKey = 83;
OrderSearchKey = 84;
QuoteSearchKey = 85;
QuoteID = 86;
Integration = 87;

SdataIntegration = 88;
SdataMappings = 89;
TaxCode = 90;
Location = 91;
SalesPerson = 92;
PreviousPerson = 93;
ExchangeIntegration = 94;
ExchangeMappings = 95;
EmarketingCampaignId = 96;
ServerMailMergeId = 97;
SmartUIEntityId = 98;
SmartUIRecordId = 99;
NewCompanyKey = 110;
NewIndividualKey = 111;
NewLeadKey = 112;
NewSolutionKey = 113;
NewAccountKey = 114;
CustomPage = 120;
EMarketingUserId = 122;
SESearchKey = 123;
MailchimpCampaignId = 124;
MailchimpCampaignClickId = 125;
ConsentManagementId = 126;

Note: Some of these keys are redundant and others are very specific to certain integrations.