Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating a custom field value #17

Open
tracy-goalkeeper opened this issue Feb 18, 2017 · 2 comments
Open

Updating a custom field value #17

tracy-goalkeeper opened this issue Feb 18, 2017 · 2 comments

Comments

@tracy-goalkeeper
Copy link

tracy-goalkeeper commented Feb 18, 2017

`I'm having trouble updating a custom field value.

According to the documentation, to update a nested field you just include the id. I've tried the following that return a status code 200 but doesn't update the boolean_value:
var update_options = { url : 'https://goalkeeper.batchbook.com/api/v1/people/' + 592 + '.json?auth_token=redacted', method: 'PUT', json: {person: { id:592, cf_records:[{ id: 1999, custom_field_set_id:6, custom_field_values:[ { id: 3986, custom_field_definition_id:43, boolean_value :false }] }] } } }

@m0dd3r
Copy link
Contributor

m0dd3r commented Feb 21, 2017

I'm guessing the false value is getting converted to 0 or something by whatever you're using to make the http request. Try using a string "false" instead. I just made exactly that request against using curl and had to make that change to get it to work.

@tracy-goalkeeper
Copy link
Author

Using "false" fixed my issue, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants