In FSM TIMESEARCH screen, I would like to set a default value of the logged in user to the search field NON_PART_USAGE.MANAGER_PERSON_ID.
I have created a client script to do the job thats uses the SetControlValue function, but the value is not set on the screen.
The SetControlValue always returns ‘False’
Here is the script used:
var MgrPersonID = getControlValue('NON_PART_USAGE','MANAGER_PERSON_ID');
returnvalue=true;
if (MgrPersonID == '')
{
MgrPersonID = getUserInfo('PersonID');
alert('Set person id to default ' + MgrPersonID);
}
var returnvalue = setControlValue('NON_PART_USAGE','MANAGER_PERSON_ID',MgrPersonID);
alert(returnvalue);