Hello everyone,
I am fairly new to Dynamics AX Development and I'm working in an environment that is running Dynamics AX 2012 R2.
I was wondering, what determines if createOrUpdatePostalAddress will create or update?
Here is a VERY basic example that I am working with.
DirPartyTable dirPartyTable = DirPartyTable::findByNum('000099734');
DirParty dirParty;
DirPartyPostalAddressView dirPartyPostalAddressView;
LogisticsPostalAddress logisticsPostalAddress;
DirPartyLocation dirPartyLocation;
dirParty = DirParty::constructFromCommon(dirPartyTable, DirUtility::getCurrentDateTime(), dirPartyTable.partyType());
dirPartyPostalAddressView.LocationName = 'Address';
dirPartyPostalAddressView.City = 'Some City';
dirPartyPostalAddressView.Street = '133 orange Street';
dirPartyPostalAddressView.CountryRegionId = 'USA';
dirPartyPostalAddressView.IsPrimary = NoYes::No;
dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView);
In this very basic example, what do I need to add / change to make it do an update instead of creating this address over and over again?
I really appreciate any and all help on this.
Thank you so much!
*This post is locked for comments
I have the same question (0)