5

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

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
KevinManx
  • 519
  • 1
  • 5
  • 26

1 Answers1

6

Try:

LogisticsPostalAddress.ZipCode = "NewCode";
LogisticsPostalAddress_ds.refresh();
Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50