Business rule to restrict creating of a project task if top task is empty.

bhanu27
Tera Expert

Hi 

 

Can anyone suggest a business rule to restrict creating Project task if top task is empty.

3 REPLIES 3

_Gaurav
Kilo Sage

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!

Aman Kumar S
Kilo Patron

You can create a BR on the Project task table as below:

br2.PNGbr1.PNG

 

Best Regards
Aman Kumar

chetanb
Tera Guru

 

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