- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2015 01:44 PM
I have a custom table that is extended from Task.
I have a UI action that updates a custom field. It works fine if I press the button without changing anything else on the form. However, if I press the button after I've put some text into the WorkNotes field, the record updates twice in the activity log. The first update is the Approval State change and the Work Notes, and the second update contains the Approval State once again.
I have verified that no business rules are running against this table. Why is this happening? I need to ensure that the record is updated only once because I'm triggering notifications on the update.
approveIVT();
function approveIVT() {
current.u_approval_state = 1;
current.update();
action.setRedirectURL(current);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2015 01:29 PM
Hi Leslie,
If you enable all debugging and perform the action where you have some text in the work notes, what are the outputs for when you limit to:
a.) Business Rules
b.) Logs
c.) SQL
I am hoping that some information shows up in either of these logs that can shed some light on the situation. I know you said you disabled BRs for the table however in my experience there can be BRs that run from other tables that can sometimes be missed (task, global, etc.).
There could be some BR for instance that is checking on the sys_journal field, that triggers an event when the work_notes change, which then triggers this duplicate update you are seeing.
Best regards,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2015 01:29 PM
Hi Leslie,
If you enable all debugging and perform the action where you have some text in the work notes, what are the outputs for when you limit to:
a.) Business Rules
b.) Logs
c.) SQL
I am hoping that some information shows up in either of these logs that can shed some light on the situation. I know you said you disabled BRs for the table however in my experience there can be BRs that run from other tables that can sometimes be missed (task, global, etc.).
There could be some BR for instance that is checking on the sys_journal field, that triggers an event when the work_notes change, which then triggers this duplicate update you are seeing.
Best regards,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2015 01:33 PM
I have also discovered that the issue happens when updating the any field AND the WorkNotes at the same time.
It only happens if the WorkNotes is being updated.
If two or three or four other fields are updated, it works fine. But when the WorkNotes is also updated, in any combination, it duplicates the update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2015 01:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2015 01:57 PM
I'm highly suspicious that there is some script/rule somewhere that is checking for something like "current.work_notes.changes()" and then triggering an update.
Do you have access to the system logs? Are you able to see anything telling when you check "Script Log Statements" or "All"?
Best regards,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2015 02:07 PM
AHA! I found the business rule that was updating the record. It's a custom business rule that runs on the TASK table and my table is extended from task.
I simply need to exclude my table in the Business Rule condition.
Thank you so much Brian and all others who have helped. You're the best.