Frappe Cloud Support Partners Foundation Frappe School

I want to have a custom field which depend upon if the doctype sales order has any assignment or not

custom field is assignment status has only 2 select assigned or unassigned.
what can i do so that i can make this kind of custom field

May we know what is the purpose for such customization? in other words, how the user use this custom field?

Well if the sales order is assigned or not then in the list view it will show and if action could be taken according to that easily.

If it can be done in backed no probem just help me to make this custom field.

this is standard feature, in the list view you can see the assignment icon.

How to do i explain this i want to make a custom field for just assigned or unassigned as select that will do this automatically after i assign user to the task.

Purpose is to just see whether it is assigned or not everywhere and i can also use that as filter then too

You may use hooks to update your new select field based on assigned or not.

Any hint how to pls

I think this link will help you.

Can you give me little more details.

validate: function(frm) {
if(frm.doc.task.assign_to === 0){
frm.set_df_property(d.assigned_status, options, ‘Not Assigned’);
frm.set_value(“assigned_status”,“Not Assigned”);
frm.set_df_property(d.assigned_status, options, Assigned);


This is the code i made from like everything i could find help me here with this what is the problem here, why it is not working.

This is kind a sample code if u guys can help me in this this is not working. What is the problem here?

assigned_status: function(frm) {
if(self.docstatus==0 && !task.assign_to){
frm.set_df_property(“assigned_status”, “options”, “Not Assigned”)
frm.set_value(“assigned_status”, “Not Assigned”)

		frm.set_df_property("assigned_status", "options", "Assigned")
		frm.set_value("assigned_status", "Assigned")

Is this some what correct??

Thank you for reply!

Can u please help me how to do that?