Searching for a custom script for customising BOM names


As the title of my post suggests, I am searching for a custom script to help rename my BOMs. Currently, the BOM naming series is system-generated and that is problematic for item identification so we require the BOM name to be a custom field where we can input the name of the document manually. This will help us have better identification of BOMs and their respective inventory items.

I understand that there is already a topic dedicated to this in the past here: Rename BOM
However, the solution provided to that issue takes me to an error. Maybe the solution webpage has been taken down for some reason. My issue is exactly equivalent to the issue stated in the link I have posted. The only problem is, I am unable to get the solution. If anyone can direct me to the solution, that would be great!


@Aashay_Sukhthankar is here in Set Naming System For Item Code

Thanks max. I just have another query though. I have been searching through this webpage that lists the Fieldnames and labels to reference fields and doctypes in custom scripting:

I am either unable to find or understand what the Fieldname for the label/name of the BOM Doctype is called. Say, I have a BOM that is named BOM/512030149/002 (System generated). What would the fieldname for this name be? Is it just tabBom?


@Aashay_Sukhthankar some doctypes uses a internal routine to define they names, that’s is the case of BOM, so, don’t have a specific field, but the union of item_code + an internal index

Hmm… is there a way to access the routine that is responsible for the generation of the name and put in some code there for a custom script? If not, I’d like to disable the specific routine and write another one that will allow me to put in custom names based on user input.

@Aashay_Sukhthankar, you need to open a issue for that

Thanks, Max. Will get down to it.