Retrieving
the address,state and country region id of purticular vendor whose
“Purpose” is “Business”.
Scenario:
To write a job to
retrieve the address,state and cuontry region id of purticular vendor
whose “Purpose” is Bussiness.
Step1
AP-->common-->vendors-->all
vendors . Select a purticular vendor ,
select the Business address and
give Edit . In the Address part you can see the State and country
region id also. Now you have to write a job to fetch all these
details for the selected the Business address.
Step2
write the
job
static
void
retrievingcountry(Args _args)
{
VendTable
vendTable;
LogisticsPostalAddress
logisticsPostalAddress;
str
aa;
str
address;
str
country;
str
state;
vendTable =
VendTable::find("JP-001");
address =
DirParty::getPostalAddressByType(vendTable.Party,LogisticsLocationRoleType::Business);
while
select
logisticsPostalAddress
if
(logisticsPostalAddress.Address == address)
{
info(logisticsPostalAddress.CountryRegionId);
info(logisticsPostalAddress.State);
info(logisticsPostalAddress.Address);
}
}
run the job
No comments:
Post a Comment