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
HusainHusain 

Creating a simple VF page

I am not a developer.

I am trying to create a simple VF page which would be used with a Tab so that when you click the tab it takes you to the detail page of the Account.

I am Sys Admin and it is the Account object and I get . . . insufficient permission . . .and yes I have checked the permissions for the tab and the VF page and all seem to be okay hence I think the issue must be with the code

I used this:
<apex:page >
  <apex:enhancedList listID="00B4B000000PuG8" height="600"/>
</apex:page>

I even used
<apex:enhancedList type="Account" height="600"/>

 . . . this takes me to the listview but I want to go to the detail page of the account.

 
Himanshu Jasuja 9Himanshu Jasuja 9
Hi hussain,
Use apex:detail instead of enhanced list.

<apex:detail subject="{!account.ownerId}" relatedList="false" title="false"/>

Hope this helps you.
HusainHusain

Himanshu

Not being a developer I need a little more info. So what pieces do I have to plug?

Do I plug the page id  - 00B4B000000PuG8  - in place of - !account.ownerId -? I noticed there is an owner id in there but since the detail page will be exposed in the Partner community and the owner is someone at the HO and not the people who would be looking at the detail page.
JethaJetha
Hi Husain,

This is not the supposed behavior because when you click on any tab, first you would be present with all available accounts.

Then you select one of the account and you will be redirected to detail page of that account.

So if you want to see the detail page through visualforce, then you have to specify the accounId to where you wanna go.

 
<apex:page standardController="Account">
   <apex:detail subject="{!account.Id}" relatedList="false" title="false"/> 
</apex:page>

and URL should be like : BaseURL/apex/[YoutVFPAGENAME]?id=[Id of Any one Account]
HusainHusain
Jetha,
Like I said I am not a developer. Here is the complete link from the detail page:
https://cs51.salesforce.com/0014B0000042kyL

So what do I insert where? in your line
BaseURL/apex/[YoutVFPAGENAME]?id=[Id of Any one Account]

Thanks
JethaJetha
In you case : 

BaseURL = https://cs51.salesforce.com

Your VF Page API Name(You might have created visualforce by using code which I have sent to you)

and Id, So it becomes : 

https://cs51.salesforce.com/apex/[Enter Your Page Name here]?id=0014B0000042kyL

So here you need to only insert your page name and it will work like Boommmmmmmmmmmm
HusainHusain
Boommmmmmmmmmmm

Is this supposed to be the name of the Account? Like  -  Acme Industries? Where do I get the page name from?

Thanks Jetha
JethaJetha
Have you created a visualforce page from code which I have sent to you?

If not please create, When you create a new page, It would ask you two things:

Label : Demo VF Page

Name : Demo_VF_Page

in body delete existing and enter this code : 
<apex:page standardController="Account">
   <apex:detail subject="{!account.Id}" relatedList="false" title="false"/> 
</apex:page>

Now you URL becomes : https://cs51.salesforce.com/apex/Demo_VF_Page?id=0014B0000042kyL
HusainHusain
Okay Jetha I plugged in all the info and yes now I do not get  -  insufficient privelages  . . . but when I click on the tab  -  FMP Brokerage  -  I get a blank page and not the detail page that I was hoping

This is what I have in the VF page:
<apex:page standardController="Account"> <apex:detail subject="{!account.Id}" relatedList="false" title="false"/> </apex:page>


This is waht I have in the url
https://c.cs51.visual.force.com/apex/FMP_Brokerage?sfdc.tabName=01r4B0000000KQP