server side script for ui action was not working
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2025 07:24 AM
my problem was the serverside code wasnot working
condition : current.state == 2&&(gs.getUser().isMemberOf(current.assignment_group)||gs.getUserID===current.assigned_to)
code:
//making update through serverscript
function onHold(){
g_form.setMandatory('hold_reason',true);
g_form.setMandatory('comments',true);
}
//getting field value and setting them mandatory through clientscript
if(typeof window == 'undefined')
{
current.state = 3;
current.update();
action.setRedirectURL(current);
}
please ensure that which was wrong
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2025 05:29 PM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 12:13 AM
Hi @J Siva
my requirement is the button should be visible when state was inprogress and logged in user was membeer of assignment group or equal to assigned to field. when i click the button it should make the onhold reason and comment field mandatory and it want to change the state into on hold