update picklist value in Crm 4.0 with CS - set null RRS feed

  • Question

  • Hello,

    There is a picklist (new_linediscount) on the Product entity, having label "A" (value 1), label "B" (value 2) , label "C" (value 3).

    The default value of the new_linediscount picklist is NULL (Unassigned Value).

    I need to update Products attributes via webservices.

    When new_linediscount must have a value, I don't have any problem.



    jxErpArticle.new_linediscount = new Picklist();jxErpArticle.new_linediscount.Value = 1;

    How can it be done when a Product have a 'new_linediscount'  witch needs to be set to null ?



    Monday, September 12, 2011 3:33 PM


  • Try this:

    Picklist nullPicklist = new Picklist();
    nullPicklist.IsNull = true;
    nullPicklist.IsNullSpecified = true;
    jxErpArticle.new_linediscount = nullPicklist;

    Hope this helps.

    Daniel Cai | http://danielcai.blogspot.com
    Monday, September 12, 2011 5:13 PM