Inbound action error "did not create or update sn_hr_core_case using current"

anirban300
Kilo Guru

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");

}

1 REPLY 1

Sai Kumar B
Mega Sage
Mega Sage

@anirban300 

If Inbound action script condition doesn't satisfy, it will not update the record and throws the above error/log.