Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Xero Name is not a member of Contact

Hi. In the following VB.net code use with the Xero API I get the error "Name is not a member of Contact"
Why would this be

    Sub oCreateContact()
        Dim api = New Xero.Api.Example.Applications.[Private].Core(False)
        Dim newContact As Contact = New Contact()
        newContact.Name = "Metal Fencing"
        newContact.FirstName = "John"
        newContact.LastName = "Smith"
        newContact.EmailAddress = "john@metalfencing.com"
        api.Contacts.Create(newContact)
    End Sub

Open in new window

Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

I don't use Xero but you may need to fully qualify the Contact object:

Dim newContact AS api.Contact = New api.Contact

Again, I don't know if that is even valid syntax. Do you have a .NET reference for the API? Are you using a 3rd party library for this?
ASKER CERTIFIED SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

many thanks