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 :
Microsoft Dynamics AX (Archived)

The number of arguments provided is different from the number of arguments accepted by the method when trying to check if there are any lines same as Line property in my Excel Import

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

I have a very irrational problem when  i  import from Excel and i try to check if the import from the Excel file is the same as the LinePropertyId in ProjLineProperty., i get the message "The number of arguments provided is different from the number of arguments accepted by the method "

My code for lineproperty is:

linepr = cells.item(row,7).value().bStr();

 projJournalTrans.LinePropertyId      = linepr;


if (linepr!=""){
Select firstOnly  ProjLineProperty where (ProjLineProperty.LinePropertyId == linepr);
if (ProjLineProperty){
lineflag=true;
}

else{
error(strFmt("There are no such lines!-line:%1",row));
}
}

if ((categoryflag) &&(lineflag) &&(projidflag) &&(employeeidflag) &&(hourflag)){
projJournalTrans.insert();
info('Done!');
categoryflag=false;lineflag=false; projidflag=false;employeeidflag=false; hourflag=false;
}

There are also other imports but the LineProperty one causes the problem. When LineProperty import is missing, everything works properly.

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,196 Super User 2025 Season 2 on at

    Hi,

    At what exact line in this coding is it failing with this error?

    The error is stating that you are calling a method with incorrect number of variables. I don't see anything quickly which line it could be.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans