Results 1 to 4 of 4

Thread: API Method for accessing Clients adress

  1. #1
    Join Date
    May 2007
    Posts
    36

    API Method for accessing Clients adress

    Hi,

    I am writing a report and need to access the address class.

    I get the client ID. But I cannot see how to tie that to the address class.

    So:
    Guid gClientID=Client.IDFromName(GetCurrentColumnValue("LT_O_Client").ToString());
    Client c = Client.GetItemNoMRU(gClientID);//NoMRU so that this client won't appear in the recent items drop down box in AyaNova UI

    Lets say I want to get Address.Postal value. How would I do it ?

    Thanks

  2. #2
    Join Date
    Aug 2005
    Posts
    186

    Re: API Method for accessing Clients adress

    Quote Originally Posted by MartinParsons View Post
    Hi,

    Client c = Client.GetItemNoMRU(gClientID);//NoMRU so that this client won't appear in the recent items drop down box in AyaNova UI

    Lets say I want to get Address.Postal value. How would I do it ?

    Thanks
    Hi Martin, the Client object contains the MailToAddress and GoToAddress fields which are Address objects.

    If you look in the api documentation http://api.ayanova.com/ the client object is documented with it's properties here: http://api.ayanova.com/html/Properti...BLL_Client.htm

    As you can see there, the Client object has a GoToAddress and a MailToAddress property for each address type, that's how you access it.

    Address object properties are here: http://api.ayanova.com/html/AllMembe...LL_Address.htm

    In you sample code you have the Client object in variable c so to access the address postal value:

    c.MailToAddress.Postal

  3. #3
    Join Date
    May 2007
    Posts
    36

    Re: API Method for accessing Clients adress

    Thanks John,

    yet again I miss the art of the obvious !!

  4. #4
    Join Date
    Aug 2005
    Posts
    186

    Re: API Method for accessing Clients adress

    No worries Martin; that's why we're here.

    Cheers!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •