I'm trying to save a product using the API, but i can't get my custom fields saved.
When i'm updating an existing product (on that is created in backend), this code works:
Product p = new Product( item.varenummer, "", lang.LanguageID );
ProductFieldValue pf2 = p.ProductFieldValues.GetProductFieldValue( "LeveringsBredde2" );
pf2.Value = "test" ;
p.Save();
But when i'm creating a product direktly using the API, i get a Null exception on
p.ProductFieldValues.
What's the correct ways to save customfields to a product, both to new and existing products.
Regards
Martin