Inside the Sales Order Items child table, I have a custom field called design_file (Attach field).
When a user uploads a file like:
-
abcd.png -
sample.jpg -
design.ai
I want ERPNext to automatically rename the uploaded file using this format:
<Sales Order ID>_<Customer>.extension
Example:
-
Sales Order ID =
Q038 -
Customer =
xyz
Then uploaded file should become:
Q038_xyz.png
Expected Result
The renamed file should reflect everywhere:
-
In the
design_filefield -
In
File.file_name -
In
file_url
Example:
Q038_xyz.png
instead of original uploaded name.