Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Russell McGinnis 48 posts 183 karma points
    Nov 05, 2014 @ 23:01
    Russell McGinnis
    0

    Get custom datatype Enum values through API?

    I have a need to hide certain elements of uCommerce and create Products programatically. I therefore need to be able to set properties on the Product to match a custom enum datatype for the product. Is it possible to get hold of the DataType values through the uCommerce.API namespace or any other namespace ?

    Thanks

  • Jesper Nielsen 141 posts 498 karma points
    Nov 25, 2014 @ 13:43
    Jesper Nielsen
    0

    Hello Russell,

    You can use the EntitiesV2.DataType class to find the data type. The DataType objects have a collection of DataTypeEnums.

    You can find it, for exsample, like this:

    DataType.All().Where(x => x.TypeName == "MyCustomTypeName").FirstODefault();

    Kind regards,
    Jesper 

Please Sign in or register to post replies

Write your reply to:

Draft