How to use Services to create new node with Entity Reference field? I am able to create a new node with body field, but when I try to set the value for my entity reference field, I get


  {"form_errors":{"field_drawing][und":"An illegal choice has been
  detected. Please contact the site administrator."}}


I am sending a structure similar to the working body field, but with 'target_id' instead of 'value':

'field_drawing' = {
    'und' = [
        0 = {
            'target_id' = 123
        }
    ]
}


123 is the nid of an existing node. What would cause an 'illegal choice' response?
I figured out the solution from comments on this issue.

To set the field via services, you can set the field's widget type to "autocomplete" and instead of just sending the nid, send a string with the title of the referenced node, a space, and the nid inside parenthesis.

'field_drawing' = {
    'und' = [
        0 = {
            'target_id' = 'Title of Node (123)'
        }
    ]
}