Parent TASK closure(sc_task) check using client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 08:36 AM
Hi Developers,
We have a requirement in catalog task suppose i have one task which is getting generated via workflow and user can also generate manual task via new button,as per the requirement we need to check the parent task shouldnot get closed as soon as the child or manual tasks are open and we need to achieve this via onSubimt client script can anyone help me in getting the sample script or any approach so that we can achieve that functionality.
Thanks,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 02:26 PM
Hey Abhishek,
From what I'm reading, you want to have a way to check if a parent task has any child tasks that are still open and prevent parent task closure onSubmit. Let me know if that is correct. You can definitely use a client script with client side glide record calls to check this or you can more simply create a before update business rule that runs on your parent task table (sc_task) and performs the following check:
(I don't know which child catalog task table you're using, but for this example's sake I'll use the very broad 'task' table.)
or since they're all field checks on the child record refactor it to this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 07:43 PM
Hi John,
Thanks for the help.Provided sample script worked for me.
Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2017 09:23 AM
Hey Abhishek,
That's good to hear! Please mark the answer correct so that this thread can be closed.