Question on RITM

Mani60
Tera Contributor

HI ALL,


 If  RITM table's Assigned to field  is  empty and someone try to close the RITM at that they shouldn't close the RITM, they should get one Error message, but now in my case i'm able to close the RITM.

Thanks,

4 REPLIES 4

Sonam Tiwari
Tera Guru

Hi @Mani60 , 

Try an Update business rule with below

(function executeRule(current, previous /*null when async*/) {
    if (current.state == 3 && !current.assigned_to) { // Check if state is "Closed Complete" or anything else per your requitrement and assigned_to is empty
        gs.addErrorMessage("Cannot close the RITM as 'Assigned to' is empty.");
        current.setAbortAction(true); // Prevent the action
    }
})(current, previous);

 

@Sonam Tiwari Thanks for reply
I tried but not working, still RITM closed with empty assigned to field.

Aman Kumar S
Kilo Patron

You can have a before - update business rule on the RITM table, and set condition as State changes to Closed complete and Assigned to is Empty.

In the set values section, type in the error message and check true for Set abort action.

Without any code you can achieve this.

 

Best Regards
Aman Kumar

@Aman Kumar S Thanks for reply

I tried but not working, still RITM closed with empty assigned to field.

When all task closed then RITM and Request closed automatically , in workflow I have  used wait for condition to wait for closed all task after that I have used set value "In that I have set  state is closed  and stage is completed ".
Could you please help me how to get the proper solution.

Thanks,