- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2016 09:46 AM
In my workflow when an approval is rejected I am setting the approval state to escalate rejected, but when the workflow goes through the approval, and it is rejected the approval state is rejected. Why cant I set the value of the approval state field?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2016 06:43 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2016 09:50 AM
HI,
Can you please share screenshot of your workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2016 10:25 AM
I guess the question is are there OOB business rules that set the approval state after the approval workflow block that would override a set value workflow block after an approval rejection. If so why wouldn't I be able to set a value on the approval state after the approval block goes down the rejected path. The reason is there are a few approvals one on the actual request and one if the user has requested to escalate the request. Is there a better business process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2016 09:55 AM
Some Business Rule is for sure changing the field approval state after the workflow sets the value i can see it in the field history. I am not sure if its on the approval table / cant narrow down what is changing the field. I tried to turn on debugging all and cant see anything on the incident that changed the value. So it almost has to be on the approval table? How can i narrow down where the field is being set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2016 10:13 AM
ok so its for sure this BR on the sysapprover_approval table. But i am still not sure how to modify this business rule so it wont override my approval value. It looks like this is just checking approvals on WF's?
// Run any workflows for our parent so they can check the approval states
//
// 3.20.2011 - modified to use generic approval for any table via the document id/source_table,
// the check for sysapproval remains to provide backwards compatibility for records already in
// play that were entered into approval using the sysapproval to store taskID.
// Going forward, all records will get a document_id and a source table, but if they are null, this
// function assumes sysapproval column in the task table.
runWorkflow_userApprove();
function runWorkflow_userApprove() {
var id = current.sysapproval.nil() ? current.document_id : current.getValue('sysapproval');
var table = current.source_table.nil() ? 'task' : current.source_table;
if (id != null && table != null ) {
var gr = new GlideRecord(table);
if (gr.get(id)) {
new Workflow().broadcastEventToCurrentsContexts(gr, 'update', null);
}
}
}