How to update vendor addresses in Dynamics AX 2009

One of the blog contact ask a question, how we can update the address for a vendor in Dynamics ax 2009,  below job is the possible answer and may helps.
static void J1A_UpdateVendAddressType(Args _args)
VendTable vendTab; //
Replace VendTable with CustTable when run this for
DirPartyTable dirPartyTab;
Address addTab;
while select vendTab join dirPartyTab
join forupdate addTab
where vendTab.PartyId == dirPartyTab.PartyId
&& addTab.AddrTableId == dirPartyTab.TableId
&& addTab.AddrRecId == dirPartyTab.RecId
      if(addTab.Name == ‘Birincil Adres’)
        addTab.type = AddressType::Payment;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: