Hi guys,
What would be the best way to implement a check for duplicates on the ProductNumber?
What I want is to avoid mistakes when defining products. The ProductNumber should be unique.
Thank you,
Adrian
Hi guys,
What would be the best way to implement a check for duplicates on the ProductNumber?
What I want is to avoid mistakes when defining products. The ProductNumber should be unique.
Thank you,
Adrian
For this, we have used Product.BeforeSave Notificationsubscriber and StopExecution
https://doc.dynamicweb.com/api-docs#article=59a82bc6-cce3-1592-2901-70342df8694f
But not sure is it the best solution
Hi,
Thank you very much for the suggestion.
That's what I had in mind as well. I was curious if there would be another way of handling it but I can surely use your suggestion.
Thank you,
Adrian
Hi Shiwanka & Adrian
I have tried your suggestion using Product.BeforeSave Notificationsubscriber and StopExecution. When saving a product the notification subscriber triggers and the updated product data is not saved in the database. But the data seems to be saved in the cache. This can be seen when one has updated some product data and hits save and close. When editing the same product again the data updated is shown, eventhough it's not saved in the database. How did you manage to fix this issue?
can you try this
ProductService productService = new ProductService();
productService.ClearCache();
You must be logged in to post in the forum