Action initialization hook for a field value

In this example, the action hook initializes the problem description field with the login name of the user who is initiating the Submit action.

VBScript


Dim session 

Dim loginName 

` Get the session

set session = GetSession 

` Get the logon name

loginName = session.GetUserLoginName 

SetFieldValue "problem_description", loginName 

Perl


# session is preset for Perl. No GetSession is required.

# Get the logon name

$loginName = $session->GetUserLoginName();

$entity->SetFieldValue("problem_description",$loginName);