web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to Import Excel Data in Invent Movement Journal IN AX 2012.

(0) ShareShare
ReportReport
Posted on by 61

Error Show me :The number of arguments provided is different from the number of arguments accepted by the method.

I debug my code . where in loop 

row++;    this error show me in box.

I have the same question (0)
  • Komi Siabi Profile Picture
    13,093 Most Valuable Professional on at

    Hello Fawad,

    Please share your code with us for possible help.

  • Fawad Ahmad Profile Picture
    61 on at

    void clicked()

    {

         SysExcelApplication    application;

         COMVariantType          type;

         //COMVariant              value;

         InventDim              _inventdim;

         SysExcelCells           cells;

         int row=1;

       //...Table's Object Created

       do

       {

          row++;

       InventJournalTrans.TransDate =str2DateDMY(Ahmad_BankAccountDuplication.ExcelCellContent(row,1)   );

       InventJournalTrans.ItemId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,2)   );

       inventdim.configId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,3)   );

       inventdim.InventSizeId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,4)   );

       inventdim.InventColorId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,5)   );

       inventdim.InventLocationId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,6)   );

       inventdim.InventSiteId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,7)   );

       inventdim.inventBatchId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,8)   );

       inventdim.wMSLocationId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,9)   );

       inventdim.inventSerialId =(Ahmad_BankAccountDuplication.ExcelCellContent(row,10)   );

       InventJournalTrans.MZNPurchUnit =(Ahmad_BankAccountDuplication.ExcelCellContent(row,11)   );

       InventJournalTrans.Qty =any2real(Ahmad_BankAccountDuplication.ExcelCellContent(row,12)   );

        //InventJournalTrans.LedgerDimension=str2int(Ahmad_BankAccountDuplication.ExcelCellContent(2,13)   );

        _inventDim=inventDim::findOrCreate(inventDim);

         InventJournalTrans.InventDimId = _inventDim.inventDimId;

       ////...Info

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,1)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,2)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,3)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,4)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,5)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,6)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,7)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,8)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,9)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,10)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,11)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,12)  );

         info ("Cell Content is     "+Ahmad_BankAccountDuplication.ExcelCellContent(2,13)  );

       type=cells.item(row+1, 1).value().variantType();

    }

    while (type  != COMVariantType::VT_EMPTY);

    application.quit();

       //info(strFmt("show row/column values: row %1, col %2", row, col));

    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans