27 October 2016

How to get Site contact details / Electronic address / Phone Email in AX 2012

Please refer the below image that will help to under relation between related tables.

static void inventSiteElectronicAddress(Args _args)
{
InventSite inventSite;
InventSiteLogisticsLocation inventSiteLogisticsLocation;
LogisticsLocation logisticsLocation;
LogisticsElectronicAddress logisticsElectronicAddress;

inventSite = InventSite::find("ARNAGE"); // ARNAGE is the inventsite name

select firstonly inventSiteLogisticsLocation
where inventSiteLogisticsLocation.Site == inventSite.RecId
join firstonly logisticsLocation
where logisticsLocation.ParentLocation == inventSiteLogisticsLocation.Location
join firstOnly logisticsElectronicAddress
where logisticsElectronicAddress.Location == logisticsLocation.RecId
&& logisticsElectronicAddress.Type == LogisticsElectronicAddressMethodType::Phone
&& logisticsElectronicAddress.IsPrimary == NoYes::Yes;

info(logisticsElectronicAddress.Locator);
}

5 comments:

  1. Hello! Thank you for sharing this solution, I've just searching for something like that. Your blog is very helpful for me, because I can improve my knowledge and learn something new about Microsoft Dynamics AX.

    ReplyDelete
  2. A nice article here, i think that people who have grown up with the idea of using computers are showing more responsibility towards writing posts that are thoughtful, do not have grammar mistakes and pertinent to the post..

    Study Abroad Consultants in Chennai | Study in Germany Consultants in Chennai | Germany Education Consultants in Chennai

    ReplyDelete
  3. Beste nicht leitende und leitfähige Klebstoff- und Kleberfabrik in China, wasserdichter Klebstoff für Kunststoff, Metall, Glas und Gummi, spezialisiert auf Klebstoffe für Halbleiter, Haushaltsgeräte und Anwendungen mit elektronischer Montage und Oberflächenschutzmaterialien für Chipverpackungen und -tests wasserfeste Klebstoffe China

    ReplyDelete
  4. La mejor fábrica de adhesivos y pegamento no conductiva y conductora en China, pegamento impermeable para plástico, metal, vidrio y caucho, especializado en adhesivos para semiconductores, electrodomésticos y aplicaciones de ensamblaje electrónico y materiales de protección de superficie para envases y pruebas de chips. fabricante de adhesivos impermeables China

    ReplyDelete
  5. 中国の最高の非導電性および導電性接着剤および接着剤工場、半導体、家電および電子アセンブリ用の接着剤、およびチップパッケージングおよび試験のための表面保護材料および表面保護材料のための防水接着剤。 工業用防水保護フィルム

    ReplyDelete

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension-...