Describe the bug
Purchase limit code is a unique identifier across the whole database. As a result, a user might have difficulties finding a unique code for a new purchase limit. Additionally, if a user picks a code that exists under another company the error message is vague: "Server validation error".
Set code to some code that exists under another company (e.g. Rustic_0K_USD_ORDER) click save.
See error
Expected behavior
Ideally, the code should be unique per b2b unit. However, it can be solved in many different ways. E.g. the user does not edit the code but some name and the code is generated by the back-end.
Spartacus could handle "duplicate name" error if returned by backend, we will request backend team update api to give us a better error and then change Spartacus to handle it.
Describe the bug Purchase limit code is a unique identifier across the whole database. As a result, a user might have difficulties finding a unique code for a new purchase limit. Additionally, if a user picks a code that exists under another company the error message is vague: "Server validation error".
Tell us the version of Spartacus
To Reproduce Steps to reproduce the behavior:
Expected behavior Ideally, the code should be unique per b2b unit. However, it can be solved in many different ways. E.g. the user does not edit the code but some name and the code is generated by the back-end.
Screenshots