Import Items/Product through X++ AX 2012 [Initial Version]

I used below code for Distinct Product.

 

EcoResProductService erProdSrv;
EcoResEcoResProduct EcoResProd;
EcoResEcoResProduct_Product_Distinct ProdMast;
EcoResEcoResProduct_Translation Translation;
EcoResEcoResProduct_Identifier Identifier;
EcoResEcoResProduct_ProductDimGroup ProdDimGroup;
EcoResEcoResProduct_TrackingDimGroup TrackDimGroup;
EcoResEcoResProduct_StorageDimGroup StoreDimGroup;

 

//CLASS INITIALIZING
erProdSrv = EcoResProductService::construct();
EcoResProd = new EcoResEcoResProduct();
ProdMast = new EcoResEcoResProduct_Product_Distinct();
//END HERE

 
ProdMast.parmDisplayProductNumber(conPeek(readCon, 1));
ProdMast.parmProductType(EcoResProductType::Item);
ProdMast.parmSearchName(conPeek(readcon, 2));
Translation = ProdMast.createTranslation().addNew();
Translation.parmDescription(conPeek(readCon, 3));
Translation.parmLanguageId(“en-us”);
Translation.parmName(conPeek(readCon, 3));
Identifier = ProdMast.createIdentifier().addNew();
Identifier.parmProductNumber(conPeek(readCon, 1));

/* TrackDimGroup = ProdMast.createTrackingDimGroup().addNew();
TrackDimGroup.parmProduct(conPeek(readCon,1));
TrackDimGroup.parmTrackingDimensionGroup(conPeek(readCon, 10));
StoreDimGroup = ProdMast.createStorageDimGroup().addNew();
StoreDimGroup.parmProduct(conPeek(readCon,1));
StoreDimGroup.parmStorageDimensionGroup(conPeek(readCon, 11));*/
// ProdMast.parmVariantConfigurationTechnology(EcoResVariantConfigurationTechnologyType::PredefinedVariants);

EcoResProd.createProduct().add(ProdMast);
erProdSrv.create(EcoResProd);

BulkUpload::insertProductCompleteData(_fileName);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s