{"recordType":"customer","id":"3698","values":{"cu...
# suitescript
k
{"recordType":"customer","id":"3698","values":{"custentity_lf_school_record":[{"value":"2242","text":"Michigan, Univ of"}],"entityid":"M-Den"}} [4:40 PM] I am trying to get to "M-Den" [4:40 PM] I used result.values.entityid and got undefined
b
this is usually because you dont actually have the object
Copy code
{
  "recordType": "customer",
  "id": "3698",
  "values": {
    "custentity_lf_school_record": [
      {
        "value": "2242",
        "text": "Michigan, Univ of"
      }
    ],
    "entityid": "M-Den"
  }
}
typically from a misunderstanding of how N/log works
N/log does not actually log the object you pass in for the details, it converts it to json first
the other usual explanation is that its a string instead of an object, typcially seen in map/reduce scripts
both of these explanations dont fit your description unless you failed at representing your problem effectively
both of them would throw a TypeError instead of getting undefined from result.values
e
If I'm not mistaken results returned by saved searches are returned as an array of objects. So you might need to specify the array index of the object that you're trying to retrieve values from.