Author: Rohan Aditya
Key points covered:
Your Script Include isn’t working in the mobile input form? You double-checked the code, cleared cache, maybe even whispered a prayer — but nothing. Classic developer déjà vu.
Usually, it’s one of these two sneaky culprits:
Fix both, and your form will finally come to life — no rituals required.
Here’s an example that automatically sets the Assignment Group when the form opens.
var MobileUtils = Class.create();
MobileUtils.prototype = {
initialize: function() {},
populateDefaultAssignmentGroup: function() {
var assignmentGroup = gs.getProperty('service.desk.group');
return {
"Value": assignmentGroup.toString(),
"DisplayValue": "IT Service Desk"
};
},
type: 'MobileUtils'
};
Create Assignment Group Variable and set variable type to Scripted
Create Variable attribute and select name as Script and call script include in Value.
Create Assignment Group Input field, in that under Autofill variable select the above Assignment group variable
And that’s it! Now when you open your form, your Assignment Group shows up by default.