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)

Wrong argument type for function

(0) ShareShare
ReportReport
Posted on by

vAccountType = str2num(conpeek(transline,4));

above vAccountType is an integer variable declared as int.

it is showing as Wrong argument type for function. Not getting it. I am a newbie. Anyone please help. Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Bashir Ahmad Profile Picture
    5,248 on at

    conPeek retrun anytype ,

    Retrieves a specific element from a container, do the following :

    anytype aty;

    aty = onpeek(transline,4);

    vAccountType = str2num(aty ) OR  vAccountType = str2Int(aty);

  • Oleg Abapolov Profile Picture
    39 on at

    Hi Mahesh,

    I guess there are at least 3 reasons for the "Wrong argument type for function" error:

    1. element number 4 in transline container is not a string

    2. container transline does not have element number 4

    3. container transline is empty

    Best regards,

    Oleg

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