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
Sindhu AmbarkarSindhu Ambarkar 

inline edit is not working

Hi,
Inline edit is not working in the code<apex:page standardController="Account"> <apex:detail subject="{!account.industry}" relatedList="false.
when the account id is passed as query parameters blank page is getting displayed
Best Answer chosen by Sindhu Ambarkar
Amit Chaudhary 8Amit Chaudhary 8
Please check below post
https://help.salesforce.com/apex/HTViewSolution?id=000003911

Please try below code:-
Example 1
<apex:page standardController="Account">
        <apex:detail subject="{!account.Id}" relatedList="false" inlineEdit="true"/> 
</apex:page>
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_inline_editing.htm

Exmaple 2:-
<apex:page standardController="Account" recordSetVar="records" id="thePage"> 
    <apex:form id="theForm"> 
        <apex:pageBlock id="thePageBlock"> 
            <apex:pageBlockTable value="{!records}" var="record" id="thePageBlockTable"> 
                <apex:column >
                    <apex:outputField value="{!record.Name}" id="AccountNameDOM" /> 
                    <apex:facet name="header">Name</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!record.Type}" id="AccountTypeDOM" /> 
                    <apex:facet name="header">Type</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!record.Industry}" 
                        id="AccountIndustryDOM" />  
                        <apex:facet name="header">Industry</apex:facet>
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" /> 
            </apex:pageBlockTable> 
            <apex:pageBlockButtons > 
                <apex:commandButton value="Edit" action="{!save}" id="editButton" />
                <apex:commandButton value="Save" action="{!save}" id="saveButton" />
                <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton" />
            </apex:pageBlockButtons> 
        </apex:pageBlock> 
    </apex:form>
</apex:page>

I hope example 1 will help you. Please let us know if this will help you

Thanks,
Amit Chaudhary

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please check below post for inline VF page. I hope that will help you to fix the issue.
http://blog.jeffdouglas.com/2009/05/08/inline-visualforce-pages-with-standard-page-layouts/
http://salesforce.stackexchange.com/questions/53606/is-it-possible-now-to-add-inline-vf-page-in-standard-new-edit-page-layout
 
<apex:page standardController="contact" extensions="inlinecontroller">
 <apex:form >
   <apex:pageBlock title="My Inline Visualforce page">
    Account Name <apex:outputField value="{!accRec.name}"/><br/>
     Account Number  <apex:outputField value="{!accRec.accountnumber}"/><br/>
     Annual Revenue     <apex:outputField value="{!accRec.annualrevenue}"/>
   </apex:pageBlock>
 </apex:form>
</apex:page>
 
public with sharing class inlinecontroller {
Public contact conRec{get;set;}
Public id accRecId;
Public account accRec{get;set;}
    public inlinecontroller(ApexPages.StandardController controller) {      
     accRecId = [select id,accountid from contact where id = :ApexPages.currentPage().getParameters().get('id')].accountid;
      if(accRecId != null)
         accRec = [select id,name,accountnumber,annualrevenue from account where id =:accRecId];
    }
}

http://www.cloudforce4u.com/2013/10/using-inline-visualforce-page.html

Please let us know if this will help you.

Thanks
Amit Chaudhary
VahidVahid
If your requirement is to display account detail page that's id is passed in the parameter you can use this:
<apex:detail subject="{!$CurrentPage.Parameters.id}"/>

Here id is the parameter which contains id of the account id. 

Thanks
Abdul Vahid
www.ibirdsservices.com
(iBirds Software Services Pvt. Ltd.)
Amit Chaudhary 8Amit Chaudhary 8
Please check below post
https://help.salesforce.com/apex/HTViewSolution?id=000003911

Please try below code:-
Example 1
<apex:page standardController="Account">
        <apex:detail subject="{!account.Id}" relatedList="false" inlineEdit="true"/> 
</apex:page>
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_inline_editing.htm

Exmaple 2:-
<apex:page standardController="Account" recordSetVar="records" id="thePage"> 
    <apex:form id="theForm"> 
        <apex:pageBlock id="thePageBlock"> 
            <apex:pageBlockTable value="{!records}" var="record" id="thePageBlockTable"> 
                <apex:column >
                    <apex:outputField value="{!record.Name}" id="AccountNameDOM" /> 
                    <apex:facet name="header">Name</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!record.Type}" id="AccountTypeDOM" /> 
                    <apex:facet name="header">Type</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!record.Industry}" 
                        id="AccountIndustryDOM" />  
                        <apex:facet name="header">Industry</apex:facet>
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" /> 
            </apex:pageBlockTable> 
            <apex:pageBlockButtons > 
                <apex:commandButton value="Edit" action="{!save}" id="editButton" />
                <apex:commandButton value="Save" action="{!save}" id="saveButton" />
                <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton" />
            </apex:pageBlockButtons> 
        </apex:pageBlock> 
    </apex:form>
</apex:page>

I hope example 1 will help you. Please let us know if this will help you

Thanks,
Amit Chaudhary
This was selected as the best answer
William TranWilliam Tran
Sindhu, what are you trying retrieve with Accout.industry - it is not an object?  You need an id like account.id.

Use the code below, it will list all the account info including industry.

<apex:page standardController="Account"> <apex:detail subject="{!account.id}" relatedList="false" inlineEdit="true"/> </apex:page>

Thx
Sindhu AmbarkarSindhu Ambarkar
Thanks a lot for all your valuable comments and it has helped me a lot
Sindhu AmbarkarSindhu Ambarkar
Thanks a lot for all your valuable comments and it has helped me a lot
William TranWilliam Tran
Sindhu,  glad we could help.  

Just a reminder, I saw you select multiple best answers, there can only be ONE best answer.

Also, could you go into the Success Community and select best answer there too to close that question also.

Good luck and be sure to ask more questions if you have them.

Thx
Sindhu AmbarkarSindhu Ambarkar
Thanks a lot William.I will update it
Sindhu AmbarkarSindhu Ambarkar
Iam unable to change it as if iam trying to change it is not reflecting