when i put for example the department link in creating a new designation so that when creating a new designation, I choose which department should include this new designation. when i click on the department it gives me a dropdown to choose from the already existing department. It also gives me 2 other options which are: create new department, and advanced search. I want to remove these 2 options. how can i do that?
Hi @hazzouma,
We applied your scenario in Employee doctype for the department.
That for, Please create the client script for Employee doctype.
Code:
frappe.ui.form.on('Employee', {
refresh: function(frm) {
frm.set_df_property('department', 'only_select', true);
}
});
Before:
After:
Reference:
Thank You!
2 Likes
It changed in the designation but i want it also to change in the “new designation” tab. I don’t know how to do that.
frappe.ui.form.on('Employee', {
refresh: function(frm) {
frm.set_df_property('designation', 'only_select', true);
}
});
Then reload and check it.
Thank You!
2 Likes