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)

Error when i try to update the logisticspostaladdress table from AIF service.

(0) ShareShare
ReportReport
Posted on by 15

Hi,

I have written a customized logic to update the existing address (with reference of location Id) of the customer from AIF document service. And it works fine when i pass the xml from the SOAP UI and debug in visual studio. I can see the values are getting updated in the logistics postal address in DirParty.CreateorUpdate method, It goes to the update method. But If i remove the debugger and run the SOAP UI with same data. it throw me error "Cannot create record in addresses(LogisticsPostalAddress). Location: Line delivery address,by Centre, 81,Newgate street,london %1,EC1A 7AJ."please help me to find the solution and answer for my three questions.

1). if i debug the postaladress.update() code executes in the dirparty.createorupdate method and the address is getting update perfectly. but without debugger for the same xml data why it try to insert, because the error is something about insert. 

2). Why it works perfectly while debugging and i get the error only when i run without debugger and the xml data i pass in the both cases are same.

3). Why the error shows %1 instead of country name(Ex:united kingdom). In AX work space if i go to the customer address the addresses has the value United kingdom, but in the database it is storing as the country name as %1 in the logisticspostaladdress.address field. Please help me out to fix this issue.


We have done Full compile, Full CIL after clearing the XPPIL folder, sync, cache refresh, AOS restart and Service registration etc.  .

Version: AX2012 R3.

Thanks,

Muhil

*This post is locked for comments

I have the same question (0)
  • Muhil Profile Picture
    15 on at

    Yes tried refreshing the Cache

    We tried passing the XML from the SOAP UI on the server AOS machine.

    But same error. Works with debugger but not without.

    Thanks,

    Muhil

  • Rati Sharabidze Profile Picture
    612 on at

    Hello,

    It shows %1 because the address field contains %1 in reality. %1 is replaced every time by the country as there is the method postload of the table or view overriden.

    Check also the macro DirParty in AOT. The %1 token is taken from the macro #CountryRegionToken.

    Kind regards

  • Muhil Profile Picture
    15 on at

    Thanks i got the answer for my 3rd question. But still other 2 are open. Kindly let me know if any findings.

  • Rati Sharabidze Profile Picture
    612 on at

    Hi,

    Regarding the 1 and 2 questions. Which caches did you clear and on which server? Was the server where the AOS instance(s) are installed?

  • Muhil Profile Picture
    15 on at

    Yes in the AOS server. I cleared the cache for data, dictionary,  elements, report server. I deleted the files in the Xppil folder and restarted the AOS, Full CIL, compile, sync.

  • Rati Sharabidze Profile Picture
    612 on at

    Hi,

    In addition to what Crispin said, make sure that you close AX, then clear .auc files and then open AX.

    BR

  • Muhil Profile Picture
    15 on at

    Ok. Will try this update.

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