Developer forum

Forum » Development » Date ProductCategoryFields return different values in code, if a product has been saved.

Date ProductCategoryFields return different values in code, if a product has been saved.

Jonas Krarup Dam
Reply

Hi,

We've run into a scenario that seems inconsistent. 

steps: 

* Create some products (either backend or via import)

* Create a product category with a date or datetime field

* access the new productCategoryField using the API - this returns NULL. 

* open the product in backend, save it without making any changes.

* access the new productCategoryField using the API - this returns DateTime.MinValue.

This seems inconsistent, and forces us to add extra to our code when working wiht datetime fields. 

Would it be possible for DW to be consistent  and always return datetime.MinValue? by default DateTime fields are not nullable, so I think this would make most sense :-) 

Thanks, Jonas
 


Replies

 

You must be logged in to post in the forum