Redirect to problem record

Southsayer
Tera Expert

Hello Guys,

 

I have a requirement i.e. to open a problem form whenever in the Change form we change state from schedule to implement. Remember we don't need to create a problem record but just open a problem record. (also how can we populate a few fields on the problem record like description or short description)

 

I can achieve this with UI actions but I wanna do it using business rules, is it achievable? 

this is the script I wrote but it is not working

 

(function executeRule(current, previous /*null when async*/) {
if (current.state == 'Implement' && previous.state == 'Scheduled') {
var redirectURL = 'incident.do?sys_id=-1';
action.setRedirectURL(redirectURL);
}
})(current, previous);
 
 
thanks in advance