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)

AX 2012 - Updating Address Purpose field

(0) ShareShare
ReportReport
Posted on by 400
The scenario is this: for whatever reason, many Customers, Vendors and Contacts have a blank Purpose field for their addresses. I'm attempting to write a Job that will update this field with the "Business" purpose RecId. My code is following the path: CustTable > DirPartyPostalAddressView > DirPartyLocation > DirPartyLocationRole. I can successfully add records into the DirPartyLocationRole table, however this change is not reflected in the AX Interface. For a Customer, the address purpose field remains blank. Has anybody had success with this? Is there a table that I'm not updating? Or, is there a better way to do this? Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    you need to update recId from DirPartyLocation table

    Please validate and update your findings

  • keane.dcunha Profile Picture
    400 on at

    Thank you Nitesh for reminding me to update this post. It turns out my issue was more related to code logic rather than any AX issues.

    In Summary:

    - I ended up having success by following the table object path I mentioned in my earlier post: CustTable > DirPartyPostalAddressView > DirPartyLocation (using findbyPartyLocation() method) > DirPartyLocationRole (using DirPartyLocation RecId).

    - Once at the DirPartyLocationRole, I retrieved the appropriate LogisticsLocationRole type and its corresponding RecId

    - as a final step, I needed to use the createPartyLocationRoles() method.

    Once you have your code the with appropriate loops and/or conditional logic, you should be good to go.

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