
I have been running into the error Field 'Configuration technology' must be filled in.
I have the following code:
AxdEntity_Product_EcoResProductMaster prodMasterEntity = new AxdEntity_Product_EcoResProductMaster();
prodMasterEntity.DisplayProductNumber = productNumber;
if (itemType == "Item")
{
prodMasterEntity.ProductType = AxdEnum_EcoResProductType.Item;
}
else
{
prodMasterEntity.ProductType = AxdEnum_EcoResProductType.Service;
}
prodMasterEntity.Identifier = new AxdEntity_Identifier[1];
prodMasterEntity.Identifier[0] = new AxdEntity_Identifier();
prodMasterEntity.Identifier[0].ProductNumber = productNumber;
prodMasterEntity.ModelingPolicy = new AxdEntity_ModelingPolicy[1];
prodMasterEntity.ModelingPolicy[0] = new AxdEntity_ModelingPolicy(); //used to auto generated variants, currently not used thus no properties set.
prodMasterEntity.ProductDimGroup = new AxdEntity_ProductDimGroup[1];
prodMasterEntity.ProductDimGroup[0] = new AxdEntity_ProductDimGroup();
prodMasterEntity.ProductDimGroup[0].Product = productNumber;
prodMasterEntity.ProductDimGroup[0].ProductDimensionGroup = "Rev";
prodMasterEntity.SearchName = searchName;
prodMasterEntity.StorageDimGroup = new AxdEntity_StorageDimGroup[1];
prodMasterEntity.StorageDimGroup[0] = new AxdEntity_StorageDimGroup();
prodMasterEntity.StorageDimGroup[0].Product = productNumber;
prodMasterEntity.StorageDimGroup[0].StorageDimensionGroup = prodStorageDim;
prodMasterEntity.TrackingDimGroup = new AxdEntity_TrackingDimGroup[1];
prodMasterEntity.TrackingDimGroup[0] = new AxdEntity_TrackingDimGroup();
prodMasterEntity.TrackingDimGroup[0].Product = productNumber;
prodMasterEntity.TrackingDimGroup[0].TrackingDimensionGroup = batchGrp;
prodMasterEntity.Translation = new AxdEntity_Translation[1];
prodMasterEntity.Translation[0] = new AxdEntity_Translation();
prodMasterEntity.Translation[0].Name = productName;
prodMasterEntity.Translation[0].LanguageId = "en-us";
prodMasterEntity.VariantConfigurationTechnology = AxdEnum_EcoResVariantConfigurationTechnologyType.PredefinedVariants;
AxdEcoResProduct productDocument = new AxdEcoResProduct();
productDocument.Product = new AxdEntity_Product_EcoResProduct[1];
productDocument.Product[0] = prodMasterEntity;
CallContext ctxProdMast = new CallContext();
ctxProdMast.Language = "en-us";
EcoResProductServiceClient prodMastServiceClient = new EcoResProductServiceClient();
MessageBox.Show(prodMasterEntity.VariantConfigurationTechnology.ToString());
try
{
prodMastServiceClient.create(ctxProdMast, productDocument);
MessageBox.Show("Successfully created Product Master");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
However I still receive the error. Any ideas?
*This post is locked for comments
I have the same question (0)