Hi,
I just wanted to get some feedback regarding a custom field in the Orders entity used to input a unique order ID, (separate from the built in "CRM Order ID" field). For example, "13.0101.WO" is one such order ID. The "13" signifies the year of order, the ".0101" signifies that this was the first order of the year (and increments by .0001 for each following order for the year), and lastly, the ".WO" suffix signifies that it's a work order. Currently, users are inputting these order ID's manually for each new order. My question is, would it be feasible to develop a script that could automatically fill in the custom order ID field in this specific format upon form creation?
I've done some searching around, and have already found examples of scripts for custom auto-incrementing values in CRM. My main issue with this custom order ID is how to get the first two digits for the current year, and keeping it up to date. I'm not an advanced developer by any means, but my thinking is that the script will have to get today's date and parse the last two digits of the current year to a string. Additionally, there will have to be a condition that checks the current year. The script would have to know when to increment the first two digits to the next year, and also to set the middle four digits back to ".0101" upon the first order of the new year. So, the last order of 2013 might be something like "13.0128.WO", but then the first order of 2014 would start at "14.0101.WO".
Does anyone have any thoughts on this? Like I said, I'm not an advanced developer. A point in the right direction would be much appreciated.
↧
Customized Automatic Order Numbering
↧