Changing Employee Status

The problem has been solved but it still throws an error…
I am unable to get the error.
How can i know what error i am getting

Please post the error traceback

in my script i have written if error
the employee is unable to terminate
so i am getting this error how can i know the error?

you have not return anything.

So how can i set the employee status to left by returning.
In my python code i have used set value.
So what do you suggest.

if you don’t return anything then Js callback will not be triggered
so you have to return something after set_value in order to get the msgprint in the callback

I changed my py script
as s=frappe.db.set_value(“Employee”,employee,“status”,“Left”)
return s

Still it is not being triggered

Is the Employee status changed as Left?
If yes then check r.message by using console.log inside your if

Yes it is changed.!
Thanks a ton!

1 Like