Can't retrieve connected record field




  • Avatar
    Brad Stevens

    Hi Fred,

    You're trying to retrieve connected field data that doesn't exist without accessing the data in a 'lookup'.  If you log record.field_195_raw[0] to the console (and view it Google Chrome) the output looks like:

    Object {id: "56a8616f1097b2613a7d95ed", identifier: "Johnny Customer"}

    So the only data that comes with field_195 is the id of the client and the identifier that's displayed.

    To set variables for both: 

    var clientID = record.field_195_raw[0].id;
    var clientName = record.field_195_raw[0].identifier;

    If you need any other data from the client object, you'll need to use an Ajax data access call using the id.

    Hope that helps.

    Comment actions Permalink
  • Avatar
    Fred Smalkin

    Absolutely - thanks!

    Comment actions Permalink

Please sign in to leave a comment.