Answers.Body: <p>I'm not sure I understood exactly what you try to access, but pretty much every entity in civicrm is accessible via an API, and you can easily use it from javascript.</p>
  
  <p><a href="https://docs.civicrm.org/dev/en/latest/api/interfaces/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/api/interfaces/</a></p>
  
  <p>you can use the api explorer and experiment, once you have succeeded fetching the data, you can copy paste the generated javascript code and add it in your own extension, or wherever you want to put your custom code. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-01T10:02:43.100Z
Answers.LastActivityDate: 2019-05-01T10:02:43.100Z
Answers.UserDisplayName: Xavier
Body: <p>Does anyone here know about CRM? Accessing lookup field data (composite address field) using JavaScript? Lookup field is on Contact form. Trying to access address of Account entity</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-30T12:23:24.037Z
Comments.Text: Welcome Giles!  It's not entirely clear what you're trying to do - for instance, CiviCRM doesn't have an "Account" entity, and I'm not sure what the "composite address" fields refers to, and there are many "Contact" forms.  Could you please edit your question (including screenshots if you're not sure the name of a form) and hopefully someone will be able to answer!
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <custom-fields><javascript>
Title: Accessing fields/data from a lookup field
ThreadText: # Accessing fields/data from a lookup field
  
  (Asked by: username_0 on 2019-04-30)
  
  Does anyone here know about CRM? Accessing lookup field data (composite address field) using JavaScript? Lookup field is on Contact form. Trying to access address of Account entity
  
  **Tags:** custom-fields, javascript
  
  > **Comments:**
  > **username_1**: Welcome username_0!  It's not entirely clear what you're trying to do - for instance, CiviCRM doesn't have an "Account" entity, and I'm not sure what the "composite address" fields refers to, and there are many "Contact" forms.  Could you please edit your question (including screenshots if you're not sure the name of a form) and hopefully someone will be able to answer!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-05-01. Score: 0
  
  I'm not sure I understood exactly what you try to access, but pretty much every entity in civicrm is accessible via an API, and you can easily use it from javascript.
  
  <https://docs.civicrm.org/dev/en/latest/api/interfaces/>
  
  you can use the api explorer and experiment, once you have succeeded fetching the data, you can copy paste the generated javascript code and add it in your own extension, or wherever you want to put your custom code.
  
  
  ---
  
  