passing a Java script variable into a field in service manager

Hi All,


We have a variable value as "Test 1" which displays the value as 50 through Java script , i need to pass this value of Test 1 into an field in service manager, Kindly let me know how to pass the value .

tried the below code and it doesnt work.

record.test1 = field 1