Create new Item with Custom Script

Hi there.

I have a modified BOM doctype that get the Item name from the source Project.
I want to create this Item automatically when I save the BOM list. That mean I don’t need to select the Item from the list.

Whats the best way?
I need to create a Custom Script that create an Item from existing Project name when I create the new BOM document and then select this item for BOM.

Please let me know how to do that.
Server side script isn’t a solution in this case.

Thanks.

An old question that fits my need. A big ask it is, but any help would be highly appreciated.