Want to set info message once click on button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 12:03 AM
Hi All/
We have created ui action "conferm and Complete" on "sn_hr_core_task", once click on button task should be closed complete and shows message your task is completed and button will be disable.task is closed complete but not showing message and not disable the button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 12:07 AM
hello
you need to add gs.addInfoMessage('task has been completed') in the script
and in the condition also add like below
&& current.state!=3
mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 12:18 AM
Hi Mohith,
condition:current.template == 'f49234e5976c59504887b79fe153afe4' && current.assigned_to == gs.getUserID();
see the below code:
var parentRec = current.parent.getRefRecord();
current.state = 3;
current.update();
gs.addInfoMessage("Task has been closed complete");
parentRec.state = 18;
parentRec.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 12:19 AM
current.template == 'f49234e5976c59504887b79fe153afe4' && current.assigned_to == gs.getUserID() && current.state!=3;
change your condition to above so that it gets disappeared when it gets closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 12:09 AM
Hi, Absnow
you need to add gs.addInfoMessage('task has been completed') to show the message.
please click helpful if this is Helpful