static void UpdateVendAddressType(Args _args) { VendTable vendTab; // Replace VendTable with CustTable when run this for customers. DirPartyTable dirPartyTab; Address addTab; ; ttsbegin; 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; addTab.update(); } } ttscommit; }