You need to sign in to do that
Don't have an account?
Alex Valavanis 10
Mass edit VisualForce, What next?
Hello,
I've been given the following Apex code as i want to mass edit on a custom object "Task".
As i am new to Apex code i don't know wjat the steps are and how to use it. Could you please guide me?
So far i included it in VisualForce pages. What is my next step?
<apex:page standardController="Task__c" recordSetVar="records">
<apex:form >
<apex:pageBlock title="Task Summary" mode="inlineEdit">
<apex:pageBlockTable value="{! records}" var="rec">
<apex:column headerValue="Name" >
<apex:outputField value="{! rec.Name}" />
</apex:column>
<apex:column headerValue="Description " >
<apex:outputField value="{! rec.Description__c}" />
</apex:column>
<apex:column headerValue="Estimated Date for Task" >
<apex:outputField value="{! rec.Estimated_Date_for_Task__c}" />
</apex:column>
<apex:column headerValue="Owner" >
<apex:outputField value="{! rec.Owner__c}" />
</apex:column>
<apex:column headerValue="Status " >
<apex:outputField value="{! rec.Status__c}" />
</apex:column>
<apex:column headerValue="User Story " >
<apex:outputField value="{! rec.User_Story__c}" />
</apex:column>
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton action="{!quicksave}" id="saveButton" value="Save" rendered="true"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="true"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
I've been given the following Apex code as i want to mass edit on a custom object "Task".
As i am new to Apex code i don't know wjat the steps are and how to use it. Could you please guide me?
So far i included it in VisualForce pages. What is my next step?
<apex:page standardController="Task__c" recordSetVar="records">
<apex:form >
<apex:pageBlock title="Task Summary" mode="inlineEdit">
<apex:pageBlockTable value="{! records}" var="rec">
<apex:column headerValue="Name" >
<apex:outputField value="{! rec.Name}" />
</apex:column>
<apex:column headerValue="Description " >
<apex:outputField value="{! rec.Description__c}" />
</apex:column>
<apex:column headerValue="Estimated Date for Task" >
<apex:outputField value="{! rec.Estimated_Date_for_Task__c}" />
</apex:column>
<apex:column headerValue="Owner" >
<apex:outputField value="{! rec.Owner__c}" />
</apex:column>
<apex:column headerValue="Status " >
<apex:outputField value="{! rec.Status__c}" />
</apex:column>
<apex:column headerValue="User Story " >
<apex:outputField value="{! rec.User_Story__c}" />
</apex:column>
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton action="{!quicksave}" id="saveButton" value="Save" rendered="true"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="true"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Your code should work what is the error you are getting.
Refer below links
http://salesforceworld.blogspot.com/2011/06/inline-editing-in-visualforce-page.html
https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005eqIQAQ
Best Regards,
Sandhya
All Answers
Your code should work what is the error you are getting.
Refer below links
http://salesforceworld.blogspot.com/2011/06/inline-editing-in-visualforce-page.html
https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005eqIQAQ
Best Regards,
Sandhya
I fixed the error (was a typo) but my issue now is that i receive only 20 records on my page. I've been doing some reading and looks like i need to create a Custom Contrller (?).
Is there any chance you could tell how to do this based on the code above?