6

I needed to output some text on a custom object and managed to do so by embedding the following VF in the Custom Layout:

<apex:page standardController="Standard_Controller__c">
    <apex:outputPanel layout="block" style=" height: 50%;">
                <apex:outputText style="font-style:italic" value="Test">
    </apex:outputText>
            </apex:outputPanel>
</apex:page>

However, the same VF does not appear in the standard edit page layout. Does it mean that this is not possible?

Thanks,

I.

6 Answers 6

3

Hi this has been delivered in Summer 16'. See this Idea for reference.

enter image description here

5
  • Please note that this is not a social media site. We do not use hash tags here, and they do absolutely nothing to improve content.
    – Adrian Larson
    Commented Jul 26, 2016 at 12:34
  • 2
    I see a comment that it is only released for lightning. Actual release notes would be a much more logical link.
    – Adrian Larson
    Commented Jul 26, 2016 at 14:55
  • Received feedback from @AskSalesforce on twitter that this is Partially Delivered. And what that Partially is not clear. Commented Jul 27, 2016 at 13:28
  • @anupprakashh this is partially delivered in summer 16 success.salesforce.com/ideaView?id=08730000000Br8CAAS … Thanks! ^RG Commented Jul 27, 2016 at 13:32
  • Is there any updates on this? It can only be done in Lightning still, correct?
    – TheAdmin
    Commented Dec 13, 2016 at 8:54
2

EDIT:

So this feature apparently is not available, but you can vote for it on the ideas exchange here. It is potentially on the product management team's roadmap.

ORIGINAL ANSWER:

It sounds like VisualForce is overkill for your use case, but regardless your question here is about how to embed a VisualForce Page in an Edit Page Layout.

First, begin editing your Layout. Click VisualForce Pages - Section.

enter image description here

Once you have added a Section, you will be prompted to give it a Name and specify if it should be displayed on the Detail Page as well as the Edit Page. Make sure Edit Page is checked.

enter image description here

If you click the little wrench icon in the top right to edit its properties. You can want to go back and add this option to an existing section, hover on the header and you will see a little wrench icon that will bring the dialog back up.

enter image description here

4
  • are you sure? OP asked for VF page embedded in Standard Edit page -- I can only get VF pages to appear on Standard Detail pages
    – cropredy
    Commented Mar 6, 2015 at 2:50
  • Huh, I guess I always assumed that checkbox did what it purported to do. It is potentailly on the roadmap...success.salesforce.com/ideaview?id=08730000000Br8CAAS.
    – Adrian Larson
    Commented Mar 6, 2015 at 2:54
  • 1
    if it were possible, then overriding the Edit button would be used less frequently. at least this idea has a shot at happening unlike most of mine :-(
    – cropredy
    Commented Mar 6, 2015 at 5:35
  • @AdrianLarson tried to do this yesterday - do you know why it isn't working for me? is it because the edit instance is something hard coded in SF and cannot be modified - unless you override the whole edit button functionality?
    – TheAdmin
    Commented Dec 13, 2016 at 8:53
1

2020 update about the current feature gap between lightning/LEX and Classic:

Please vote for https://trailblazer.salesforce.com/ideaView?id=0874V000000PkZqQAK to help prioritize adding support for embedded/inline visualforce/components in Classic:

The concept is currently only available in Lightning/LEX per https://trailblazer.salesforce.com/ideaView?id=08730000000Br8CAAS

1
  • Thanks for bringing this to my attention, this was an old question and since then I moved (gladly) away from SF, but it is nice to know that things are progressing towards the right direction.
    – panza
    Commented Jan 4, 2021 at 12:34
0

add a section on the Standard_Controller__c object page layout and pull this page into it. It will displayed on detaile page. But when you click edit (I mean on edit page you can not see it)

3
  • are you saying that there is no way to display it when editing the page? Thanks.
    – panza
    Commented Mar 5, 2015 at 18:14
  • If you replicate the standard page on a vf page you can show that custom Vf part which you are willing to show. If not my answer to your question is YES.
    – Suresh
    Commented Mar 5, 2015 at 18:28
  • I believe he's saying that the only way to display the VF markup you provided above is to completely recreate the standard edit page using the standard controller, and add in your code as well. Visualforce pages added into a page layout do not display on edit. Commented Mar 5, 2015 at 20:23
0

Aside from Suri's solution, you could also create a field on the object with your value, then display it as locked. Would need to know more about what you want to display before you do this.

4
  • thanks for this. I will only need to display a fairly simple textual information that needs to be visible on the Std edit layout, too. I have forgotten to mention that my custom object is actually a record type - does this open up for other potential ways to display the text?
    – panza
    Commented Mar 5, 2015 at 22:01
  • You mean your custom object has one or more recordtypes? That doesn't impact anything. I would create a custom field to display your text and add it to the layout. Note that formula fields are not displayed in edit mode, so just create a text field with your value as the default, and then lock it on the layout. Another option that might serve well here is to put your text into a section header on the layout. Make sure to make it viewable on edit. Commented Mar 5, 2015 at 22:04
  • thanks once again. I have tried to create a Text custom field and assigned the default value of "This is my text", then made it READ-ONLY. Although i can see on the edit page, it expects a user input and does not output the default value. Am i missing anything?
    – panza
    Commented Mar 6, 2015 at 0:02
  • Default values are only set when a new record is created. You will need to use the dataloader (or Jitterbit, Demand Tools, etc) to set the value for all existing records. This is the advantage of putting your text in the Section Header on the page layout - it automatically populates on all records, though it is a little easier to miss from a user's POV. Also, as a System Administrator, you have the ability to edit all fields regardless of whether they are locked on the layout. Log in as a user to make sure the "lock" worked. Commented Mar 6, 2015 at 15:20
0

Embedding a VF page in edit mode can be done only for lightning and not in classic. Another option could be, create a custom VF page, use Fieldset from Salesforce and standard controller to get similar functionality and embed your VF page over there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .