Business rule to restrict creating of a project task if top task is empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 04:32 AM
Hi
Can anyone suggest a business rule to restrict creating Project task if top task is empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 05:00 AM
Hi @bhanu27
Not sure about the exact requirement but you check the value of the top task is empty then use the below line to abort the action.
current.setAbortAction(true);
Please mark this as helpful and accept it as a solution if this works for you.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 05:24 AM
You can create a BR on the Project task table as below:
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 05:47 AM
Hello @bhanu27 ,
You can create before BR on project_task table on any field.
and in the script -check
if (current.toptaskfieldname.getDisplayValue() = = ' ')
{ gs.error ('Top task cannot be empty');
current.setAbortAction(true);
}
if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
CB