I am currently building an external application that utilises SalesForce's REST APIs and have it complete except that I need to be able to display the solutions attached to a case.
I can attach a solution to the case via the CaseSolutions object however I am unable to retrieve any information of records from this Object nor can I find this information elsewhere.
CaseSolution, CaseComment and Attachment objects all return blank record results when queried and a 404 if the case ID is queried along with the object.
Does anyone know if attached solutions can be retrieved via the REST API?
Any help with this matter would be greatly appreciated.
The code I'm using to add a solution to the case is below:
$.ajax({
type: 'POST',
url : 'https://eu11.salesforce.com/services/data/v37.0/sobjects/CaseSolution',
data : json,
headers : {
'Authorization' : 'Bearer '+sx.access_token,
'Content-Type' : 'application/json'
},
success : function(response){
confirmation_message('success', "'" + question + "' has been successfully attached to this case");
}
})
This works and I can log into my SalesForce account and can confirm that the solution has been successfully added.
In regards to retrieving solutions attached to the case:
$.ajax({
type: 'GET',
url : 'https://eu11.salesforce.com/services/data/v37.0/sobjects/CaseSolution',
headers : {
'Authorization' : 'Bearer '+sx.access_token,
'Content-Type' : 'application/json'
},
success : function(response){
}
})
or
$.ajax({
type: 'GET',
url : 'https://eu11.salesforce.com/services/data/v37.0/sobjects/CaseSolution/'+sx.current_record,
data : json,
headers : {
'Authorization' : 'Bearer '+sx.access_token,
'Content-Type' : 'application/json'
},
success : function(response){
}
})
I have tried Attachments, CaseComments as well instead of CaseSolution without any luck.