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)

Need Party Recid

(0) ShareShare
ReportReport
Posted on by 6,611

Hello!

I have a CompanyInfo record with a PartyNumber value but I need to get to a Party recid value and am not sure how the relationship works. What I'm ultimately doing is trying to get to the remit-to address for the current selected company.

Not to muddy the waters, but if I can get SiteId for the current company I could work to the remit-to address also.

Any guidance would be appreciated!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    305,624 Super User 2026 Season 1 on at

    Hi Kbanh,

    If you are referring to AX 2012, the RecId of the CompanyInfo and DirPartyTable are equal (= do have same record id value).

  • bankk Profile Picture
    6,611 on at

    Hi Andre,

    I apologize if I'm confusing you. Basically i'm trying to get this line of code to return the remit-to address. Where I'm using CompanyInfo::current() is passing back a PartyNumber for the method need Party recid but I'm not sure how to get it while only having PartyNumber available.

    DirParty::findPostalAddressByRole(CompanyInfo::current(), LogisticsLocationRoleType::RemitTo);

    Hope that clears things up a bit. Thanks!

  • André Arnaud de Calavon Profile Picture
    305,624 Super User 2026 Season 1 on at

    Hi Kbanh,

    The method you have mentioned is working. The CompanyInfo::current() command retrieves the RecId of the current active company.

    Is this what you wanted to achieve or do you have just a PartyNumber of some (another) organization and wants to get from this PartyNumber the Remit-to address?

  • bankk Profile Picture
    6,611 on at

    Hi Andre,

    I learned our remit-to address is actually setup at the site level. Now rather than get the remit-to address from the current company, I would need to get site Id and I'm not sure if that's possible given I have companyinfo. Any thoughts?

    As always, thank you.

  • André Arnaud de Calavon Profile Picture
    305,624 Super User 2026 Season 1 on at

    Hi Kbanh,

    If you have multiple sites setup in your environment, it will be a bit difficult to determine which site should be found to get the address. With only the ConpanyInfo, you don't know it.

    Perhaps you will need to create a default or fallback site field in a parameter form. Then you are able to get the appropriate site.

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dserp Profile Picture

dserp 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans