- 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 01:39 AM
Hi,
Generally this happens of this or any other business rule which is part of the same transaction has current.update in it.
So can you please check if any other BR on the same table has current.update in it?
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 01:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 02:01 AM
i disabled it and it working fine like one notification going.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 02:08 AM
dont disable it, its probably there for a reason, see my last reply