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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

element.args().record() Wrong argument types in variable assignment error

(0) ShareShare
ReportReport
Posted on by 114

Hi everyone;

I want read other form's datasource's selected record info. But i can't.  

0535.Ekran-Al_3101_nt_3101_s_3101_.JPG

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Are you sure you are getting something in the args().record() and if you are it is the same type? You should make a check before like:

    if (element.args() && element.args().dataset() == tableNum(Your_table))

    { do assign }

  • Emre Karakus Profile Picture
    114 on at

    Hi Iulian;

    I did what you said but i failed. What can I do to read the selected record in the data sources in different forms .

  • XB Profile Picture
    1,875 on at

    To catch a record from other form

    if you call one form from another, setup dataSource propierty in the button that you use to call the new form and then in your new form use element.args.record to cath it.

  • Martin Dráb Profile Picture
    239,401 Most Valuable Professional on at

    Could you explain what you mean by "I did what you said but i failed"?

    Using a compatible type is always possible and you didn't give us enough information about why you failed, so we can't tell you how to fix it.

  • Dick Wenning Profile Picture
    8,705 Moderator on at

    if(element.args() &&

     element.args().record() &&

     elements().record().tablid == Tablenum(ProjVendPaymentTable)

    {

    _buzEhaProjVendPaymentTable= element.args().record() as ProjVendPaymentTable;

    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans