Access Denied! when trying to delete records from an object
Content
Hi,
I am trying to delete data from a custom object. However when executing, I get an error:
Access Denied!
My profile has permissions to delete from this object. I've included the code I'm using. As I said, I have the permissions on a profile level and an object level.
Any suggestions?
Version
LatestCode Snippet
private function deleteOldEstablishmentData() { RNCPHP\ConnectAPI::getCurrentContext()->ApplicationContext = "Delete old establishment data"; $query = "DELETE FROM Misc.establishment WHERE UpdatedTime < '".date("Y-m-d")."' LIMIT 1000"; $roql_rs = RNCPHP\ROQL::query($query); RNCPHP\ConnectAPI::commit(); return true; }
Tagged:
1