function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
waylonatcimwaylonatcim 

Overriding buttons and links

When overriding a button on a custom object (edit, delete, etc.) with a visualforce page, is there an easy way to determine on that visualforce page what button was pressed to get there? 

 

So if I override the edit functionality of an object to go to a visualforce page called mypage, is there a way on mypage that I can tell I was re-directed from the edit button fom the object?

 

Thanks

SurekaSureka

Hi,

 

When you override Edit button, your URL contains,  "returl = %2FrecordId"

 

When you override New button,  your URL contains, "returl =%2F001.." - "001" stands for Account.

 

Similarly for the View, you URL does not contain "returl". You will just have "id=recordid".

 

Hope this helps. If so, Please mark the solution as solved.

 

Thanks

 

 

waylonatcimwaylonatcim

Thanks for the reply.

 

I actually need the Edit and Delete buttons, and when I print out the retURL in a test it is exactly the same, so your tip will not work. 

SurekaSureka

Hi,

 

You have a parameter "delID" for the delete in the URL.Through this you can differentiate Edit and Delete.

 

Thanks