I am getting an error while closing the change request from Business rule.

THOUSIF S N1
Tera Contributor

I have a requirement where if the change requestes Planned start date have passed and state is in New then when user opens the request add the closure information then once he/she saves the form then state should change to close.

 

I had written a Simple BR and in script i have added as below:

current.state = '3';

current.work_notes = 'working';
current.setWorkflow(false);

but this is not working as OOB BR'State model - Can change state?' is restricting this.

can any one tell me how can i surpass this.

3 REPLIES 3

Jaspal Singh
Mega Patron
Mega Patron

Hi Thousif,

OOB state change for change request is governed by the BR you mentioned. Any reason to bypass? IF so, you might need to disable the BR & then run the script & then enable again.

my requirement is:

If change is in New state with a passed 'Planned start date'

When I push the "Unauthorized change" field (check box)  to true (u_unauthorized_change) and  I add a  "Close code" and "Close notes" and I click on save or update option/button.

Then a business rule is applied to automatically close the change.

 

But above mentioned OOB BR is not allowing. How can achieve my requirement?

@Ankur Bawiskar  can you please help me out