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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

POS cannot create a customer's shipping address

(0) ShareShare
ReportReport
Posted on by 187

Good morning all.

I am facing a problem with POS on Dynamics AX R3 CU11. When creating a SO on POS, everything is fine until I want to create a new shipping address. The system lets me to fill everything in but says that Customer couldn't be saved centrally after hitting Save on the new shipping address.

I was digging into it and found out that it fails on finding the newly created address in the DirPartyPostalAddressView. Whatever is passed as parameters, this method always returns null as it cannot find the record. 

It's code is

public static DirPartyPostalAddressView find(DirPartyRecId _party, LogisticsLocationRecId _location, utcdatetime _validFrom = DateTimeUtil::utcNow(), utcdatetime _validTo = _validFrom)
{
DirPartyPostalAddressView postalAddressView;

select firstonly postalAddressView
where postalAddressView.Party == _party &&
postalAddressView.Location == _location &&
postalAddressView.ValidFrom <= _validFrom &&
postalAddressView.ValidTo >= _validTo;

return postalAddressView;
}

At first, I suspected it's because some mismatch of UTC datetime and it is not returning the record because of it. But it did not work even when I removed the ValidFrom/ValidTo conditions. It just looks like the view is not getting materialised or the last created record is not getting there yet. (I even tried to commit any transaction before calling this method - no luck, the address is physically created but it is not getting into the view.)

And the strange thing - if I call the same method of RTS directly from a job in AX, it perfectly works (even with running it under the user of RTS web service). So it is happening only when it is physically called from the web service.

Call stack is basically:

DirPartyPostalAddressView.find (line 5)
DirPartyLocationEntity.createAddressForParty (line 36)
DirParty.createOrUpdatePostalAddress (line 28)
RetailTransactionServiceCustomer.createAddress (line 144)
RetailTransactionService.createAddress (line 80)

Thanks a lot for any help/ideas. 

*This post is locked for comments

I have the same question (0)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans