Hello,
I have created a custom field whose select list is dependent on the status of the interview. Below is the client script that i have used.
frappe.ui.form.on(“Interview”, “status”, function(frm) {
if (frm.doc.status == “Pending”) {
set_field_options(“custom_statut_additionnel”, [“Rappel/ To do”]);
} else if (frm.doc.status == “Rejected”) {
set_field_options(“custom_statut_additionnel”, [
“Sur calibrer en matière d’expériences”,
“Sous calibrés en matière d’expériences”,
“Sur calibrer en matière de rémunération”,
“Pas a l’écoute”,
“Pas intéressé”
]);
}
}
);
The issues that I am facing are:
- When i create an interview, by default it is in the status pending, however the related custom list does not appear. I have to select another status then reselect pending, then the list appears.
- When I save the interview, it takes the value, however when I perform a refresh, the custom field value disappears. The value still remains on the list view, but when I go the screen, its not present.
Kindly help on this issue.
Regards,