For creating list button in relationlist, I changed my constructor StandardController
to StandardSetController
. After changing constructor in VisualForce Page
, the standard Clone
, Edit
, and New
buttons are not overriding. Does StandardSetController
only work for listbuttons, and not for standard buttons? What can I do to override standard buttons?
3 Answers
StandardSetController is used in order to extend functionality on ListViews. In addition, if you open a List view (Open object tab and click on Go! button) you cannot find Save / Edit / Clone buttons.
StandardController takes care of a single record and yo can use it in order to override Standard buttons.
Find here a good example.
In order to override standard button the VF page MUST be using the StandardController. You can create a custom button named new and use it and hide the Standard new button (Except on list view)
StandardsetController allow you to create list controllers, doesnt work for single object. You must use StandardContoler to make new,edit button work.
..?
). Not sure if usage is more common where you are but I would advise to use just the question mark for clarity.