Skip to main content
Can anyone tell me how to reference string table constants within code modules?

This is what I've tried:

Dim sServer As String

sServer = Sourcecode.KO.StringTable("dbServer")



and I get this error message:

Compile Error: DestinationUserResolver(Code Module) Line 16: 'StringTable' is a type in 'KO' and cannot be used as an expression.



A little modification

Dim sServer As String

sServer = Sourcecode.KO.StringTable.Item("dbServer")



results in a different error:

Compile Error: DestinationUserResolver(Code Module) Line 16: Reference to a non-shared member requires an object reference.

Within a Server Event, I can easily reference it using:

Sub Main(ByVal K2 As ServerEventContext)
Dim SPSServer As String

SPSServer = K2.StringTable.Item("SharePointURL")



Can anyone help me figure this out? I get absolutely nothing out of the help files.
You can not instantiate the KO object yourself. You need to pass in the K2 object from where you call the code module. This K2 object can be a:
ClientEventContext;
DestinationRuleContext;
EscalationActionContext;
EscalationRuleContext;
ExceptionContext;
IPCEventContext;
LineRuleContext;
...
etc
...
ServerEventContext.

Hope this helps,
Ockert

Reply