Get the Vendor telephone number from dirPartyContactInfoView
static void SL_GetVendorContactInformation(Args _args)
{
dirPartyContactInfoView dirPartyContactInfoView;
VendTable vendor;
logisticsElectronicAddress logisticsElectronicAddress;
vendor = VendTable::find("VEND-0000331");
select firstOnly Locator from dirPartyContactInfoView
order by dirPartyContactInfoView.IsPrimary desc
where dirPartyContactInfoView.Party == vendor.Party &&
dirPartyContactInfoView.Type == LogisticsElectronicAddressMethodType::Phone;
info(strFmt("Address is %1", dirPartyContactInfoView.Locator));
}
No comments:
Post a Comment