15 January 2016

DIXF: DMFProductEntity - displayProductNumber auto generate not working

When importing products to staging table with the Data Import Export Framework through the Entity DMFProductEntity with auto generated displayProductNumber we faced the error message "Numbersequence not set". This is due to the fact that MS has used another EDT in the DMFProductEntity.
The following Workaround helps importing products with generated numbers.
  1. Extend the NumberSeqModuleInventory.loadModule() with the following Code:
// Setup product display number for DMFProductEntity
    datatype.parmDatatypeId(extendedtypenum (EcoResProductDisplayProductNumber));
    datatype.parmReferenceHelp("@SYS301183");
    datatype.parmReferenceLabel(literalstr("@SYS133863"));
    datatype.parmWizardIsContinuous(false);
    datatype.parmWizardIsManual(NoYes::No);
    datatype.parmWizardIsChangeDownAllowed(NoYes::No);
    datatype.parmWizardIsChangeUpAllowed(NoYes::No);
    datatype.parmSortField(1);
    datatype.parmWizardHighest(999999);
    datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
    this.create(datatype);
  1. Change the method from protected to public
  2. Create a job to call the loadModule method:
    NumberSeqModuleInventory numberSeqModuleInventory = new NumberSeqModuleInventory();numberSeqModuleInventory.loadModule();
  3. Change the method back to protected
  4. Go to Inventory and Warehousemanagement Parameters and set the Number Sequence for Product Number. You could use the same Number Sequence as for Item Number or create a new one.
              
     

No comments: