How to update a custom relate field through the API

In trying to figure out how to do this, I found several unanswered posts related to this but it took me a while to figure out so I thought this might help somebody.

If you create a custom relate field (in my case prior_meeting_c in the Meetings Module), the field shows up as prior_meeting_c in an API retrieve as expected. However, to update the field you have to use meeting_id_c.

To get that name, I looked at the fields_meta_data table and looked for records with vname like ‘prior_meeting’ which showed two results: prior_meeting_c and meeting_id_c.

2 Likes

Thank you for your post, I was struggling with this as well!

I have a custom field (type relate) that relates to the user module and to update this field I had to add "user_id_c": MY_USER_ID to the attributes object in my API PATCH request.

I also found that you can use the browser inspect element on the field in question, when viewing (not editing) a record of the module. In my case I got <span id="user_id_c" ...