GetSession

Description

Returns the current Session Object.

This method instantiates a new Session object using the current session information. This method is intended for use in hook code only and should not be called from any other context.

If you are creating a stand-alone application, you cannot call this method to obtain a Session object. You must create your own Session object and pass it to any stand-alone application methods that need it.

You can use this method to obtain the Session object associated with the current user. See the description of the Session object for more information on how to use this object.

Syntax

VBScript


entity.GetSession 

Perl


$entity->GetSession(); 
Identifier
Description
entity
An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed (VBScript only). For Perl hooks, see Getting a Session object.
Return value
The Session Object representing the current database-access session.

Examples

VBScript


set sessionObj = entity.GetSession 

Perl


$sessionobj = $entity->GetSession();