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)

The 'value' argument is incompatible with the required type.

(0) ShareShare
ReportReport
Posted on by 30

I stumbled today on a well know error: 'Argument is incompatible with the required type.'

CustTable_Blocked.text(_MyTable.Blocked);

2678.img4.png

Please, help me.

Thank You.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    BrandonSA Profile Picture
    1,673 on at

    Hi

    I'm guessing that CustTable_Blocked is a control on a form. The text property of that control takes a string argement. You're trying to pass _MyTable.Blocked as an argument. If _MyTable.Blocked is a string, this will work fine, but if it isn't, you'll get an error. I'm guessing _MyTable.Blocked is a boolean/NoYes value, in which case you'll need to cast the value or something like that. But what ever is going on, what you're passing the text property of the CustTable_Blocked control isn't a string, which means it's an incompatible argument.

  • Yassine Fallate Profile Picture
    30 on at

    Hi BrandonSA

    it's not a boolean value but it's combox that I have to choose a value

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    It's an enum and you can't assign an enum value to a method that expects a string as an argument.

    But why are you trying to assign this value to a form control, instead of the underlying table? Only if your form control is not bound to a table field, you should assign values to the control. Otherwise, assign the value to the table field directly:

    Then you could just have:

    CustTable.Blocked = _MyTable.Blocked;

    CustTable_ds.refresh();

    CustTable_ds.research(true);

    This applies to all your other fields as well.

    If your form control is not bound to a table field, use:

    CustTable_Blocked.selection(_MyTable.Blocked);

  • Suggested answer
    Yassine Fallate Profile Picture
    30 on at

    Hi Nikolaos,

    Thank you so much for your reply

    I tried to enter the next instruction

    CustTable_Blocked.selection(_MyTable.Blocked); for comobox type

    and DataSourceCustTable_CreditMax.realValue(_MyTable.CreditMax);  for  real type

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans