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)

InventSite + LogisticsEntityPostalAddressView = how to get LocationName based on SiteId

(0) ShareShare
ReportReport
Posted on by 93

DAX Tribe,

I've been tasked with doing some Invoice report processing (email). I've got the SalesTable.InventSiteId (which links to the InventSite table), and now I need the LocationName as can be found in the InventSite form (COMPANY/Inventory management/Setup/Inventory breakdown/Sites).

Somehow the below InventSite.SiteId needs to be linked to something in the LogisticsEntityPostalAddressView view.

Any clues from you very helpful people?

Thanks,

Dave Cline

SELECT *

FROM [AOS_DB].[dbo].[INVENTSITE] 

JOINED SOMEHOW ??? TO

SELECT [LOCATIONNAME]
FROM [AOS_DB].[dbo].[LOGISTICSENTITYPOSTALADDRESSVIEW]

WHERE INVENTSITE.SITEID = '100'

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    DaveCline Profile Picture
    93 on at

    SELECT * FROM LogisticsEntityPostalAddressView A

    JOIN INVENTSITE B

     ON B.RECID = A.Entity

    WHERE A.EntityType = 1 AND B.SITEID = '100'

    ORDER BY A.IsPrimary DESC

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