Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

PrivateSession xeroapi accounts updating using vb.net

Started by Andrew Hilbig -   in Wrapper libraries

I am using XeroApi.OAuth.XeroApiPrivateSession
Repository = New XeroApi.Repository(xsession)
For Each Account In Repository.Accounts

to read Xero Chart of Accounts, compare with my equivalent xAccount.Code (called Nominal Codes) in a local client network then Add or Update accordingly to synchronise.

I can Add OK...

xAccount = New Model.Account
xAccount.Name = SelectedNominalCodeDescription$
xAccount.Code = SelectedNominalCode$
xAccount.Type = "SALES"
xAccount.TaxType = "NONE"
xAccount.Description = "Income from " & SelectedNominalCodeDescription$

Dim xResults = Repository.Create(xAccount)

but don't know how to code for Update. I know I would have to do a "find" in order to perform an update but afraid I don't have a clue.

There is xAccount.AccountID which I would guess to be a unique pointer but really don't know how to proceed. My vb.net skills are very limited.

Any assistance would be appreciated.