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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

update LogisticsPostalAddress not showing correct address in DirPartyPostalAddressView

(0) ShareShare
ReportReport
Posted on by 1,128

I updated the City in the LogisticsPostalAddress . It is updated in the table. However on the Customer Address where it shows the DirPartyPostalAddressView, it doesn't show the correct city. It shows old city.

Any idea what is happening?


Thank you!

*This post is locked for comments

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

    There shouldn't be no reason why the address will not display the new city. I imagine however, you are talking that the field is not displaying properly in the Customer details form, in the Address fast tab page, where the Address field from the view is display, right?

    That field's value is computed when changes are performed in the address' fields.

    In what form did you change the City value?

  • Ann2015 Profile Picture
    1,128 on at

    I wrote a class to update the LogisticsPostalAddress.City.

    Yes the field is not displaying correct in the customer details forms  in the Address fast tab page.

    Thank you

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Ok, so that's your problem there. You are updating the field programmatically, and I suspect you are not calling the LogisticsPostalAddress.modifiedfield(fieldNum(LogisticsPostalAddress, City)). Include this in your code and it will work.

  • Ann2015 Profile Picture
    1,128 on at

    Hi,

    I am reading data from an excel file and updating the field directly. Here is my code

    do

       {

           row++;

           custAccount = this.COMVariant2Str(cells.item(row, 1).value());

           city = cells.item(row, 2).value().bStr();

           ttsBegin;

           select Party

                  from custTable

                  join dirPartyLocation

                  where custTable.AccountNum == custAccount

                  && dirPartyLocation.Party == custTable.Party

                  join  dirPartyTable

                  where custTable.Party == dirPartyTable.RecId

                  join forUpdate address

                  where address.Location == dirPartyLocation.Location;

           address.City = city;

           address.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);

           address.update();

          ttsCommit;

  • Verified answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Insert this line

    address.modifiedfield(fieldNum(LogisticsPostalAddress, City));

    just above the .update().

  • Ann2015 Profile Picture
    1,128 on at

    great!! It worked ...Thanks a lot for the quick response. Its appreciated.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans