Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

How to grab other fields using record.get() in javascript

Topic Labels: API
3677 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Mike
4 - Data Explorer
4 - Data Explorer

I have a base that I can retrieve records from using the API from Javascript code, but I’d like to get the value for other fields besides just “Location”. Using “console.log('Retrieved: ', record.get(‘Location’));”, how do I modify this line to include in the output the field values for a field called “Size” in addition to the “Location” field? I tried separating multiple fields with a comma, but that didn’t work.

1 Reply 1
openside
10 - Mercury
10 - Mercury

Use record.fields - this is an object that contains all of the fields.

So record.fields['Size'] would get the Size field.