- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2014 12:57 PM
I am trying to add the ability to "Cancel" a request from the Change request form.
Issue, I am using the Cancel workflows upon cancellation business rule, and it works good to cancel all associated records, however, I am unable to find the method to set the state to "Cancelled."
I can change the state post update, but during update.
Any ideas?
Thanks again.
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 08:08 AM
g_form only works on client scripts and br's run on the server.. so you can't use g_form, instead use current.number.
personally i would do it as an after rule.. so it applies AFTER the change is closed not before....
also lets back up a second and think about something else.. currently if they close a change... what happens to the change tasks?? if it is like ours was the tasks will stay open even though the change is closed <not just cancelled but ANY close>
what we have done instead of cancelling the tasks is to set in a client script that when you set the change to closed or canceled checks for kids and if it finds any prompts the user that they have to close all the children before closing the change and aborts the submit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 09:50 AM
Sure where you have g_form.getValue('number')
put in
current.number
that should take care of it the rest of the script should work fine on any server side script <BR's etc> current refers to the record that called the script... so in this case current is going to be your change record... and you can use current.anyfield to get to a field.. in this case current.number will return the change request number... current.state would return the state etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 11:19 AM
Thank you very much Doug, works like a charm. I do appreciate your time!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 11:23 AM
my pleasure if you get a chance can you mark this one as answered please.. <course the points for counting my answer as correct would be a bonus! >
a lot of us stop reading if it is marked answered and that will save the other users time.