Delete Linked Related Business Objects
3 min
you can delete related business objects that are linked base url https //{tenant url}/api/odata/businessobject/{business object name}('{business object recid}')/{business object relationship name}('{recid of the related business object}')/$ref ensure the business object name is suffixed with an "s" delete links in business example here is an example to delete a journal in an incident business object url https //{tenant url}/api/odata/businessobject/incidents('87168fca6f0c46b2b5cdc5226fb7c773')/ incidentcontainsjournal('4f34db8563df450cae5381cda9805b21')/$ref \<font color="#ffffff">method\</font> delete header name authorization jwt token/session key/rest api key status code 204 response payload click to view response payload { "code" "ism 2000", "description" "ok", "message" \[ "successfully deleted the link" ], "help" "" } unsuccessful responses invalid url scenario trying to delete a link when the url is invalid invalid url https //{tenant url}/api/odata/businessobject/incident('87168fca6f0c46b2b5cdc5226fb7c773')/incidentcontainsjournal('4f34db8563df450cae5381cda9805b21')/$ref header name authorization sessionkey code ism 4004 description bad request message \[ "no service for type 'microsoft odata edm iedmmodel' has been registered " ] \<font color="#ffffff">http status code\</font> 404 invalid recid scenario trying to delete a link when the recid is invalid example https //{tenant url}/api/odata/businessobject/incidents('87168fca6f0c46b2b5cdc5226fb7c773')/incidentcontainsjournal('1234')/$ref header name authorization sessionkey code ism 4000 description invalid request message \[ "record '1234' cannot be found in the related business object 'journal#" ] \<font color="#ffffff">http status code\</font> 400
