
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 01:35 AM
Hi All,
One of the BR written on sc_request table executing twice,
BR:
Advanced :
if (current.operation() != 'insert' && current.comments.changes()) {
gs.eventQueue("sc_request.commented", current, gs.getUserID(), gs.getUserName());
}
if (current.operation() == 'insert') {
gs.eventQueue("sc_request.inserted", current, gs.getUserID(), gs.getUserName());
}
if (current.operation() == 'update') {
gs.eventQueue("sc_request.updated", current, gs.getUserID(), gs.getUserName());
}
if (!current.assigned_to.nil() && current.assigned_to.changes()) {
gs.eventQueue("sc_request.assigned", current, current.assigned_to.getDisplayValue() , previous.assigned_to.getDisplayValue());
}
if (!current.requested_for.nil() && current.requested_for.changes()) {
gs.eventQueue("sc_request.requested_for", current, current.requested_for.getDisplayValue() , previous.requested_for.getDisplayValue());
}
if (current.approval.changes() && current.approval=='approved') {
gs.eventQueue("sc_request.approved", current, current.approval, previous.approval);
}
if (current.escalation.changes() && current.escalation > previous.escalation && previous.escalation != -1) {
gs.eventQueue("sc_request.escalated", current, current.escalation , previous.escalation );
}
if (current.active.changesTo(false)) {
gs.eventQueue("sc_request.inactive", current, current.stage, previous.stage);
gs.workflowFlush(current);
}
Regards,
Roopa
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 02:03 AM
By the looks of it it should be simple to handle this.
Change this to before BR and remove/comment the current.update() line and this should fix it
Please mark my answer correct/helpful if it helped you solve your issue.
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 02:03 AM
By the looks of it it should be simple to handle this.
Change this to before BR and remove/comment the current.update() line and this should fix it
Please mark my answer correct/helpful if it helped you solve your issue.
-Anurag

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 02:26 AM
Removed only that current.update()
Its working fine. Didnt change to before , will it be ok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 02:55 AM
the after BR wont save the value of due daye, change it to before BR, that doesn't need current.upate.
Also if this is answered now then please mark my answer correct/helpful and close this thread.