Axapta 如何连接表LogisticsElectronicAddress和HcmWorker?

Axapta 如何连接表LogisticsElectronicAddress和HcmWorker?,axapta,dynamics-ax-2012,Axapta,Dynamics Ax 2012,我需要来自HcmWorker表的PersonnelNumber,但我收到的值是来自LogisticsElectronicAddress的电子邮件地址是否存在可能的连接/sql语句,我可以使用电子邮件地址查找PersonnelNumber?它们以相同的形式命名为HcmWorker,我希望理解这个问题 LogisticsElectronicAddress通过RedcId与LogisticsLocation相关,而LogisticsLocation通过RecId与DirPartyTable相关 因此,

我需要来自HcmWorker表的PersonnelNumber,但我收到的值是来自LogisticsElectronicAddress的电子邮件地址是否存在可能的连接/sql语句,我可以使用电子邮件地址查找PersonnelNumber?它们以相同的形式命名为HcmWorker,我希望理解这个问题

LogisticsElectronicAddress通过RedcId与LogisticsLocation相关,而LogisticsLocation通过RecId与DirPartyTable相关

因此,HcmWorker中插入的Worker通过表DirPerson与RecId关联

因此,如果您有LogisticsElectronicAddress,您可以使用反向方法

如下代码所示:

select LogisticsElectronicAddress
  join LogisticsLocation
  join DirPartyLocation
  join DirPartyTable
  join HcmWorker
  join DirPerson // extended DirPartyTable
 where LogisticsLocation.RecId == LogisticsElectronicAddress.Location
    && DirPartyLocation.Location == LogisticsLocation.RecId
    && DirPartyTable.RecId == DirPartyLocation.Party
    && DirPerson.RecId == DirPartyTable.RecId
    && HcmWorker.Person == DirPerson.RecId;
尝试查看所有相关表(关系、字段、值)。 注意,您可能会获得别名/非唯一值,请添加更多条件(请参阅键索引)


享受吧

我希望能理解这个问题

LogisticsElectronicAddress通过RedcId与LogisticsLocation相关,而LogisticsLocation通过RecId与DirPartyTable相关

因此,HcmWorker中插入的Worker通过表DirPerson与RecId关联

因此,如果您有LogisticsElectronicAddress,您可以使用反向方法

如下代码所示:

select LogisticsElectronicAddress
  join LogisticsLocation
  join DirPartyLocation
  join DirPartyTable
  join HcmWorker
  join DirPerson // extended DirPartyTable
 where LogisticsLocation.RecId == LogisticsElectronicAddress.Location
    && DirPartyLocation.Location == LogisticsLocation.RecId
    && DirPartyTable.RecId == DirPartyLocation.Party
    && DirPerson.RecId == DirPartyTable.RecId
    && HcmWorker.Person == DirPerson.RecId;
尝试查看所有相关表(关系、字段、值)。 注意,您可能会获得别名/非唯一值,请添加更多条件(请参阅键索引)

享受吧