Inbound action error "did not create or update sn_hr_core_case using current"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 01:37 AM
Hello All,
I have written an inbound action to update the record if state is not close complete or incomplete and call an event if the state is close complete or incomplete.
But, I am getting error as "did not create or update sn_hr_core_case using current". Can some one help?
Script:
if (current.state != '3' || current.state != '4') { //state is not close complete or incomplete
if (current.getTableName() == "sn_hr_core_case") {
var comment_text = "reply from: " + email.origemail + "\n\n" + email.body_text;
if (email.from_sys_id == current.opened_for) {
current.comments = comment_text;
} else {
current.work_notes = comment_text;
}
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
current.update();
}
} else {
gs.eventQueue('sn_hr_core.hr_reply_on_closedcomplet_wor', current, "your case has been closed");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 02:12 AM
If Inbound action script condition doesn't satisfy, it will not update the record and throws the above error/log.