I suggest to use a flow to achieve this. You can easily create one that triggers on an item created or changed event and use for instance a date property and the ID of the listitem to generate a unique ID. In the flow you can also build a check to verify the planning state.
I hope this helps. Let me know if you need more info to achieve this.