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

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: 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

    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans