Does somebody know what can cause the problem that StandardController delete() method doesn't delete the custom object from the context. My extension for Standard Controller has such method:

public PageReference deleteEntity(){
        return null;

System.debug() shows that an object is in Standard Controller's context. But it doesn't delete. I will be appreciate for any helpful hints.

1 Answer 1


This is because standardController.delete() is a server function. And your method is returning null so the page is no re-loaded hence the server function is not done.

Change your code into:

return standardController.delete();

And it will work.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .