You need to sign in to do that
Don't have an account?
VF Newbie needs some help
OK. I have spent hours trying to figure this out, so I thought I would post up and ask for some assistance. To begin, I have not had any training other than Admin- no development training. My company is not looking to spend money on training- so i need to figure it out myself. Here is what I am doing-
I needed to create a dynamic section on an opportunity page. I created it using VF and it looks like I want it, but I am having difficulties taking the next step. I am using the standard opp controller on my new VF Opp page, and I added it to the layout of one of my page layouts using the new Spring 09 page layout tool. When I do a Preview As..it comes up with a grey empty box where the VF form should be.
Now I have been reading about Force ide and using Eclipse, but I think that is only used if I am not going to us the standardcontroller for opportunities.
Am I missing anything? I am going to keep trying to learn, but I would appreciate it if anyone can help me out.
I would like to know how to make it appear, because I think once I do that- the rest is pretty much done...
Thanks in advance for any assistance.
MarioC, you can present different pages to different users. There's a recipe in the cookbook titled, "Overriding a Page for Some, but not All, Users" that should help you.
All Answers
You can use Eclipse / Force IDE to develop VF pages regardless of whether you're using a standard controller, a custom controller, or a standard controller and a controller extension.
Can you post your code - it is hard to say otherwise what the issue is?
-- Matt
Not a problem. I was not sure if my issue was coding or not knowing the system well enough to know what I was doing. Here is the code-
Does the user you're previewing as have permissions to view the VF page you're adding to the page layout?
Also, are you trying to embed this page within your page layout or have it take the place of your page layout entirely?
-- Matt
I am logged in as the System Admin and I verified that I have rights to view the page. I am currently embedding the VF page, but I would prefer to simply replace the OPP page all together. I saw that with the new spring release it displayed VF pages as an option to add to the layout, so I was just trying to get it working one way or another.
Thanks again Matt.
For the VF page to be the Opportunity page (I am assuming this is for a Opportunity Details page?) you need to override the View. To do this goto Setup>Customize>Opportunities>Buttons and Links and Override the View usin Content Type: Visualforce and select the VF page you have created.
(Sorry. Reviewing your code you want this on Edit and potentially New, so override those)
I would not recommend that you embed your VF page inline in the Opportunity Page layout as it seems rather long.
Mario,
Unfortunately it seems right now that the only behavior on button and Links Override is that it becomes the default functionality. There is not the current possibility to override for specific profiles, users or record types.
All that to say if you do override any button it will become an org wide override.
I have posted an Idea about the need to allow profile specific overrides: Idea Post
You can try but I would not recommend it. It will potentially make the page look messy. If you do add the VF page inline on a Page Layout make sure that you update your profiles with the inclusion of the VF page (if you look at a profile you will see at the bottom a section called:Enabled Visualforce Page Access)
Include your VF page here.
MarioC, you can present different pages to different users. There's a recipe in the cookbook titled, "Overriding a Page for Some, but not All, Users" that should help you.
OK. So I was able to add the overrides for new and edit Opportunities. I do have a couple more questions-
1. Because I am setting up a section in my Opp form that is rendered based on a few entries, I will need something similar as a view. I have gone through and tried to create another VF page that uses outputText instead of inputfield, but that does not seem to work like I would like. Can someone point me in the direction of a place where I can find an example of an view only page that is also inline edittable.
2. I would like to add a few Related Lists to the end of my Opp view page as well, but I cannot seem to find the syntax. We use 4-5 different related lists fields on our opps- Notes & Attachments, Open Activities, Activity History, Stage History and Approval History.
Once again, your help is much appreciated.
You wrote,
I don't understand what you are asking for. View only and edittable seem contradictory.
You can use describeLayout to find the name value for relatedlists. A quick way to do that is to use the Ajax Toolkit. See the Ajax Toolkit Developer's Guide.
I got my related lists all set, it was just using the correct syntax-
<apex:relatedList list="ProcessSteps" ></apex:relatedList>
<apex:relatedList list="NotesAndAttachments" ></apex:relatedList>
<apex:relatedList list="OpenActivities" ></apex:relatedList>
<apex:relatedList list="ActivityHistories" ></apex:relatedList>
1 down, 1 to go.
Glad you got your related lists working.
Regarding your other request - what you want is inline editing. Visualforce doesn't have "out of the box" support for this. Some people have used events (like "ondblclick") to mimic inline editing. You could do a search for "inline editing" on the forum to find out various solutions.