Loading product variant using X++ AX2012.

Hi guys, I am trying to write a job to insert the product variant i am using the following code and testing it on one item. But i am getting the following error “Product dimension Size must be specified for product 0016-007-10 : : : .”

Can some one help me in this one i am stuck up in this one. Please help.

EcoResProduct productMaster = EcoResProduct::findByProductNumber(‘0016-007-10’);

EcoResSizeName _size = ‘XL’;

EcoResColorName _color = ‘RED’;

EcoResStyleName _style = ‘TOP’;

EcoResDistinctProductVariantRecId productVariantRecId;

container productDimensions; productDimensions = EcoResProductVariantDimValue::getDimensionValuesContainer( _size,_color,_style);

productVariantRecId = EcoResProductVariantManager::createProductVariant(productMaster.RecId, ‘new variant’,productDimensions);

info(“done”);

the first parameter for EcoResProductVariantDimValue::getDimensionValuesContainer() method is configuration which should be passed empty “”