Hi, I’m trying to add more statuses in the appointment doctype. However I face this error “You can’t set ‘Options’ for field Status”.
I tried to update the doctype itself but could change anything.
A solution that I might do is to hide the status field and create my own one. but I prefer to avoid that.
What version of ERPNext are you using?
I’ve tested what you’re describing on v13.8, and it works fine. Changing Options is usually allowable for Select-type fields.
If the doctype is not created by you, then you must customize the doctype first.
But if this error is showing in a custom doctype or in a customized version of a doctype then try to remove the field and add it again with the options.
It also can be because the field is mandatory and the doctype already has some entries.
This explanation doesn’t make sense to me. I AM trying to customize the doctype by adding another word to the options in the quotation.order_type field. There’s no reason why this should be disallowed.
@James_Houx What I meant was the ERPNext doctypes like Item, when you edit the doctype it informs you that you should not edit the doctype directly but you should create another version of the doctype for customizing and to override the previous one.
Oh there are plenty of reasons to not allow changing status enums. ERPNext is a collection of business logic, some of that business logic depends on which status a document is in right now, if it’s in unknown status then it won’t do anything or worse do some default action.
This is allowed but there be dragons.
The safest option is adding a separate custom field for tracking your custom status.
After ankush responded, I realized the OP was reporting inability to change “Status” field. I’m not trying to change “Status”. The issue I’m having happens when I try to customize form for ANY Select field options on any standard doctype. I created a new issue here:
Status is just a common select field I used as an example, the point I made about enums being crucial to business logic applies to every select field.
Again, if you’re 100% sure about it, then you can create a property setter manually by looking at any other existing property setter for “options”. That’s what “customize form” does.
What is the proper approach to add one or two more statuses in between the existing ones? Creating a new coustom status field, and then having duplicate fields does not seem a correct approach.