I tried selecting all products in code, change CreatedBy property in loop and save, after I do that I can "Find(..)" them by CreatedBy property as expeted.
Any ideas of what could be the reasion that I am not able to save these properties when creating product for the first time? Or maybe I am using them incorrectly?
Could you take a look in the database after the first run and see if the values are updated? The CreatedBy and ModifiedBy properties are maintained automatically by uCommerce based on who's logged in when the code runs that might be what's tripping you up.
Issue with Product.CreatedBy property
Hello,
I am trying to create product and specify CreatedBy so later I would be able to select Products that have matching CreatedBy property.
So far I am able to create products from API, everything works fine and I can see that products are created in backend:
But when I try to select products by CreatedBy property like that I always get empty list.
I tried selecting all products in code, change CreatedBy property in loop and save, after I do that I can "Find(..)" them by CreatedBy property as expeted.
Any ideas of what could be the reasion that I am not able to save these properties when creating product for the first time? Or maybe I am using them incorrectly?
Edit: When I crete items from code for the first time they always have CreateBy property set to "admin" (default value?).
Edit functionality here seems to be broken :(
Hello,
Could you take a look in the database after the first run and see if the values are updated? The CreatedBy and ModifiedBy properties are maintained automatically by uCommerce based on who's logged in when the code runs that might be what's tripping you up.
is working on a reply...