1

So, I've been trying to implement the below link using REST's Query and QueryAll call;

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_activityhistory.htm

This in turns gives me an output like below;

SELECT ( SELECT Id, ActivityDate, Subject FROM ActivityHistories ORDER BY ActivityDate desc NULLS LAST) FROM Account where id = '0012000001XIdCt'

Each time I run this I'm getting a NotFound error back but if I run this within the developer console it works perfectly. Is there limitations of this on the REST side?!

I also come across this post on the dev forums;

https://developer.salesforce.com/forums/?id=906F0000000BKf0IAG

I can see he has the ActivityHistories within his describe of the object but I can't seem to get this either.

Anyone tried this at all?

0

When running against the REST API try structuring your GET as follows:

/services/data/v34.0/query?q=SELECT (SELECT Id, ActivityDate, Subject FROM ActivityHistories ORDER BY ActivityDate desc NULLS LAST) FROM Account where id = '0012000001XIdCt'

Also, if you want to test against the REST API, one excellent resource I use all the time is the developer workbench which can be found here : https://workbench.developerforce.com/login.php

  • Just realised I was querying v36 of the api which I don't think actually exists just yet. Will mark as answer, thanks. – r0bb077 Feb 9 '16 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.