You need to sign in to do that
Don't have an account?
Alex Valavanis 10
Inline editing Visual force
Hello,
I created a visual force page (and a custom button) which updates the account ownership from a list view. I would like to add inline editing to the below. Could you please assist me?
<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" sidebar="false" lightningStylesheets="true">
<apex:form >
<apex:pageBlock title="Edit Accounts" mode="edit">
<apex:pageMessages />
<apex:pageblockButtons location="top">
<apex:commandButton value="Save" action="{!Save}" />
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}" var="A">
<apex:column headerValue="Name">
<apex:outputField value="{!A.name}"/>
</apex:column>
<apex:column headerValue="Owner">
<apex:inputField value="{!A.OwnerId}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
I created a visual force page (and a custom button) which updates the account ownership from a list view. I would like to add inline editing to the below. Could you please assist me?
<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" sidebar="false" lightningStylesheets="true">
<apex:form >
<apex:pageBlock title="Edit Accounts" mode="edit">
<apex:pageMessages />
<apex:pageblockButtons location="top">
<apex:commandButton value="Save" action="{!Save}" />
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}" var="A">
<apex:column headerValue="Name">
<apex:outputField value="{!A.name}"/>
</apex:column>
<apex:column headerValue="Owner">
<apex:inputField value="{!A.OwnerId}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
All Answers
>> https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_inline_editing.htm
The above link has an explanation of enabling inline editing in visualforce pages you can try checking it out!!
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
Try this code snippet.
Hope this helps!