You need to sign in to do that
Don't have an account?

Visualforce override is not going to correct URL
I have created a VF page to override the view of an object. The override is already setup so when I go to view the object by clicking on it in the Object's tab or in the Recent sidebar, the commandButtons (edit/delete) don't appear. The page renders as I coded it, minus those buttons.
The url for the view is composed of the salesforce url with the object Id
https://ssl.salesforce.com/a0M000000004KAT
If I go to
https://ssl.salesforce.com/apex/viewProject?id=a0M000000004KAT
The commandButtons show up. I'm not sure what is going on because the override should "transparently" allow for this connection to be made.
I also overrode the edit functionality and the Save/Cancel buttons do show up. It only seems to be a problem on the view.
My suspicion is in permissions but the profiles have access to edit/delete/save/view on all the objects and I can do all of those actions with a standard view.
Can anyone offer some insight on this? Thanks!
The url for the view is composed of the salesforce url with the object Id
https://ssl.salesforce.com/a0M000000004KAT
If I go to
https://ssl.salesforce.com/apex/viewProject?id=a0M000000004KAT
The commandButtons show up. I'm not sure what is going on because the override should "transparently" allow for this connection to be made.
I also overrode the edit functionality and the Save/Cancel buttons do show up. It only seems to be a problem on the view.
My suspicion is in permissions but the profiles have access to edit/delete/save/view on all the objects and I can do all of those actions with a standard view.
Can anyone offer some insight on this? Thanks!
Buttons do disappear/disable themselves based on permissions when used with the standardController, but I would not expect them to function any differently based on accessing the page through an override or accessing them directly.
Please use the src button when posting code.
You don't have any weird CSS on your page that might be hiding those buttons do you?
You will lose those buttons if you don't supply an id to your page. Notice that if you go to /apex/viewProject then your buttons disappear. However the override should make the id available to you. If you put {!Project12h__c.id} on your page does the id print out when you access it as an override?
/apex/viewProject?id=a0M000000004KAT does indeed show the buttons.
With the override turned on, /a0M000000004KAT outputs the correct project data, including the ID but no Edit/Delete buttons.
I have not included any CSS on the page either.
The buttons show up when I am viewing the page in Development Mode, even at the /a0M000000004KAT URL.
When I turn off development mode, the buttons are gone.
I'm not going to even pretend that I understand this, but while I was trying to find you a good workaround I found that if I added an extension to my page, the buttons came back. If you add just an empty extension to your page does it work?
Thank you so much for your help with something so wacky. Creating an empty extension actually worked.
Good to know that the issue is already fixed in the next version.
Cheers!
Colin