- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 08:40 PM
UI Action Button 'Reject' changes the State to 'Reject' but Additional comments field should be mandatory/required then after comment is posted clicking the 'Reject' Button must be redirected to list view of custom table
What script for that?
state value for Reject is 13
Custom Table Name:
x_762234_campuscon_connect_requests
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 09:02 PM
Hi @Blitz ,
Use below script.
function information(){
g_form.setValue('state','13');
if (g_form.getValue('comments') == '') {
g_form.setMandatory('comments', true);
g_form.showFieldMsg('comments','Reason is required when rejecting a Change','error');
return false;
}
gsftSubmit(null, g_form.getFormElement(), 'reject_approval'); //MUST call the 'Action name' set in this UI Action
}
if (typeof window == 'undefined')
serverReject();
function serverReject(){
current.state = 'rejected';
current.update();
}
Thanks,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 09:02 PM
Hi @Blitz ,
Use below script.
function information(){
g_form.setValue('state','13');
if (g_form.getValue('comments') == '') {
g_form.setMandatory('comments', true);
g_form.showFieldMsg('comments','Reason is required when rejecting a Change','error');
return false;
}
gsftSubmit(null, g_form.getFormElement(), 'reject_approval'); //MUST call the 'Action name' set in this UI Action
}
if (typeof window == 'undefined')
serverReject();
function serverReject(){
current.state = 'rejected';
current.update();
}
Thanks,
Gopi