I'm new to AX development. I have created a grid control with a few fields. One field is named Qty and another field is named ScrapQty. I now want to add another field named Remainder. Remainder = Qty - ScrapQty. But I can't figure out how to do this. Can anyone help?
*This post is locked for comments
I believe your method heading should be:
display real GetUnrecoverableScrap(wfsProdJournalRoute prodJournalRoute)
Ok, thanks for the help. But I get a syntax error when I try this. Here is my code:
display UnRecoveredScrap GetUnrecoverableScrap(wfsProdJournalRoute prodJournalRoute)
{
real UnRecoveredScrap = this.QtyGood - this.NGK_RecoverableScrapQty;
Return UnRecoveredScrap;
}
The first line is underlined in red so I assume the syntax error is here. What am I doing wrong?
Here a link to MSDN where these "Display" fields are explained: msdn.microsoft.com/.../aa595058.aspx
Hi Robert,
You would use a display method on the table which is linked to your grid.
(search for 'display' on the AOT tables node to have a reference.
In this method you'll have 1 line:
return this.Qty - this.ScrapQty
Go back to your form with the grid, add a new control of the Type Real, specify the datasource and don't specify a field, but use the method property to insert the name of your display method.
You should have a calculated field by now.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156