Hi,
I'm getting an exception on proxy.Create(product) line;
Parameter value cannot be 0
Parameter name: value
uom and uomschedule both exist, even tried to hardcode uom values from existing products, with the same result
here's my code:
try
{
var query = new QueryByAttribute("uom");
query.ColumnSet = new ColumnSet("name", "uomscheduleid");
query.Attributes.AddRange("name");
query.Values.AddRange("SZT");
Entity unit = proxy.RetrieveMultiple(query).Entities[0];
Entity product = new Product()
{
Name = "test product",
ProductNumber = "123test123",
Description = "asdfasdfa",
DefaultUoMScheduleId = (EntityReference)unit.Attributes["uomscheduleid"],
DefaultUoMId = unit.ToEntityReference(),
};
var prod = proxy.Create(product);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
I have a lot of similar creation procedures working for other entities, for a first time I have to create product,
and got stuck
will appreciate any advice,
Kind Regards