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

VF page embedded in layout.
Hi,
I have a VF page, which is embedded (as a URL s-control) in the Contact page layout.
I just want to display some fields (the point is to keep these fields read only).
How do I pass make the VF page know which record's information to display (how do I pass this info, and how do I use it in the VF page side). thanks.
Ben
I have a VF page, which is embedded (as a URL s-control) in the Contact page layout.
I just want to display some fields (the point is to keep these fields read only).
How do I pass make the VF page know which record's information to display (how do I pass this info, and how do I use it in the VF page side). thanks.
Ben
I have created a VisualForce page which uses the Case object as a standard controller (see below). The page is named "CaseMrList", and is designed to show a list of bugs (internally referred to as MRs) associated with that particular case):
Because the VisualForce page uses the Case object as a Standard Controller, I can add this VF page directly to my all Case page layouts. When I edit a sample Page Layout, and select the Pages view, all VisualForce pages that use the Case standard controller are listed. You can simply drag those on to the page layout -- the same was as you would do for a S-Control or a custom / standard field.
Note the <p> next to the left of the field name, signifying it was a Page component (vs. a field or S-Control).
This final screen shows what the field looks like (work in progress, I haven't tuned the CSS yet):
All Answers
In the S-Control Url pass the variable as a merge field. (use ?id='{yourmergefield}' if your page runs on a standardcontroller).
If your VF page has a custom controller you can get to the url var's value via :
I found the following in the wiki but don't really understand what it means: "If you create a VF page that has, say standardController="Account', then you will be able to select 'Pages' as a 'field' to add in your Accounts page layout edit pages. Just drop it anywhere as you would with a normal field. You will have access the account's fields from within your VF page."
I have created a VisualForce page which uses the Case object as a standard controller (see below). The page is named "CaseMrList", and is designed to show a list of bugs (internally referred to as MRs) associated with that particular case):
Because the VisualForce page uses the Case object as a Standard Controller, I can add this VF page directly to my all Case page layouts. When I edit a sample Page Layout, and select the Pages view, all VisualForce pages that use the Case standard controller are listed. You can simply drag those on to the page layout -- the same was as you would do for a S-Control or a custom / standard field.
Note the <p> next to the left of the field name, signifying it was a Page component (vs. a field or S-Control).
This final screen shows what the field looks like (work in progress, I haven't tuned the CSS yet):
Thanks ! I used the above feature as I had similar requirement but The added VF page is not showing up in edit mode of that page layout. How to make it available in edit mode as well?
Thanks !
Sharad
Also, there is one more problem. I added the VF page into a new section in page layout. My VF page looks like
<apex:page standardController="Opportunity" tabStyle="Opportunity" action="{!saveFormalBids}" extensions="INTLC_VFExtension_Oppor_Rejection" >
<apex:pageblock >
<apex:pageBlockSection title="First Bid offered" columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Pricing Treatments" />
<apex:outputField value="{!formalbids.INTL_Pricing_Treatments1__c}" />
</apex:pageBlockSectionItem>
..........
</apex:pageBlockSection>
</apex:pageblock>
</apex:page>
Now the problem is it appears in new page block and when I remove the page block section then it produces an error that pageBlockSection should be included inside pageblock.
Can I create just the pageblocksection inside the same Opportunity detail page block by editing page layout?
Thanks !
Sharad
JP / Moderator,
Can the "Solution" flag be taken off this as it is not a solution and I'm having the same problem with "pure" visual force code below is the example.
Page Code
<apex:page standardController="Account" >
<apex:form >
<apex:commandLink value="Copy Address Details" action="{!Save}" id="CopyLink"/>
<apex:inputField value="{!account.name}"/>
</apex:form>
</apex:page>
If have then embedded this onto the Account Page Layout just above the address, when it "Detail" mode the fields within the visualforce page are editable but when you choose the edit button of the page they disappear and you are not allowed to "choose/ edit". The code from the standard controller seems to be the wrong way around or is there something within the "page" definition that needs to be updated an attribute or something?
Regards,
Trevor Miller