Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seem unable to edit form field in AX 2012 - X++

I'm working on AX 2012 in X++ and am trying to add functionality to the LogisticsPostalAddress form part. Part of the functionality needs to populate the form (before the changes are saved), but I don't seem to be able to populate the fields.

I have found reference to using the following code:

LogisticsPostalAddress_ZipCode.text("NewCode");

This doesn't seem to work. If I use:

LogisticsPostalAddress.ZipCode = "NewCode";

The form doesn't change, but if I save and reopen the form the data has been changed.

I need to populate the fields on the form so that the user can see the new values before closing the form. Any suggestions?

Kevin

like image 605
KevinManx Avatar asked Oct 02 '12 08:10

KevinManx


1 Answers

Try:

LogisticsPostalAddress.ZipCode = "NewCode";
LogisticsPostalAddress_ds.refresh();
like image 78
Jan B. Kjeldsen Avatar answered Sep 30 '22 07:09

Jan B. Kjeldsen