I currently have some code that uses http patch to send Microsoft CRM data via the 2016 web api. When my payload includes a text or int datatype it works just fine, but when the payload includes a lookup record I can't get any response beyond 400 bad request.
Below are a few of the instances of payload that I've tried (with sensitive data altered)
payload = {"new_lastweblocation": "Midlothian" }
payload = {"new_location_transaction_LastWebLocationid@odata.bind" : "https://crmnaorgXXXX.crm.dynamics.com/api/data/v8.0/new_locations(1234578-a588-e511-8105-c4346bace18c)"}
payload = {"new_lastweblocation@odata.bind" : "https://crmnaorgXXXX.crm.dynamics.com/api/data/v8.0/new_locations(1234578-a588-e511-8105-c4346bace18c)"}
Essentially I've tried passing plaintext, a guid to the record, a guid to the relationship, a guid linked via odata.bind ... etc. Clearly my shotgun approach along with the 400 error means that I fundamentally misunderstand how entities are handled in the 2016 web api. Let me know if you have any suggestions.