Table of Contents

Class Keys

Namespace
Sage.CRM.Utils
Assembly
SageCRMNet.dll

Object to represent the current key values within CRM. Keys give us information on the context a web page is in. Key0 is the number of the dominant key. Each key position represents an entity and the value of the key represents the ID of that entity.

public class Keys
Inheritance
Keys
Inherited Members

Properties

Count

Count property - number of items in the Keys list.

public int Count { get; }

Property Value

int

this[int]

Return the key value for the index.

public int this[int Index] { get; set; }

Parameters

Index int

Index.

Property Value

int

Key Value.

Methods

GetKey(int)

Get the current key value for a given key (overloaded).

public int GetKey(int KeyId)

Parameters

KeyId int

Returns

int

GetKey(string)

Get the current key value for a given entity (overloaded).

public int GetKey(string tableName)

Parameters

tableName string

Name of the table/entity.

Returns

int

SetKey(int, int)

Set the current key value for a given key (overloaded).

public bool SetKey(int keyId, int keyValue)

Parameters

keyId int

Key number to set.

keyValue int

Key value to set.

Returns

bool

True if the key was set.

SetKey(string, int)

Set the current key value for a given entity (overloaded).

public bool SetKey(string tableName, int keyValue)

Parameters

tableName string

Name of table/entity.

keyValue int

Key value.

Returns

bool

True if the key was set.