是否可以使用Web API查询回收站对象。我需要获取SalesForce Object中删除的行,那么是否还有其他对象提供已删除行的历史记录?
答案 0 :(得分:2)
Not sure what do you mean by "web API". You're connecting to Salesforce from some other app using SOAP API? Have a look at getUpdated
& getDeleted
calls (link contains details & sample code).
With REST API you can achieve similar results: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_getdeleted.htm
So now you should have some keywords too search for :) Just remember that not all objects end up in Recycle Bin. Some are hard deleted. Check answers to this question: https://salesforce.stackexchange.com/questions/24282/which-objects-do-not-go-to-the-recycle-bin-upon-deletion
答案 1 :(得分:0)
如果要选择放置在回收站中的已删除记录,只需添加查询条件以检查“isDeleted”字段等于true的记录。 例如,在SOQL中,您可以使用此类查询获取已删除的帐户:
accounts = [select id from Account where isDeleted = true ALL ROWS];
如果您使用SOAP API,可以查看getDeleted() method documentation。