You need to sign in to do that
Don't have an account?
Alex Valavanis 10
how to mass edit records in a custom object
Hello,
I want to create a way of mass uploadin fields on custom object "task". I installed mass edit/update but the instructions for custom objects are very old and they have not updated them. Anyway...
Is there a way of doing this (have no visual force / apex experience) - please see my screenshots
I want to create a way of mass uploadin fields on custom object "task". I installed mass edit/update but the instructions for custom objects are very old and they have not updated them. Anyway...
Is there a way of doing this (have no visual force / apex experience) - please see my screenshots
Please try this code it's easy and simple for new salesforce developer.
click on any field which you want to edit then save.
This is mass inlineEdit Visualforce Page.
<apex:page standardController="TaskTest__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="Discription " >
<apex:outputField value="{! rec.Discription__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>
Please mark it as best Answer if you find it helpful.
Thank You
Ajay Dubedi
All Answers
Please try this code it's easy and simple for new salesforce developer.
click on any field which you want to edit then save.
This is mass inlineEdit Visualforce Page.
<apex:page standardController="TaskTest__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="Discription " >
<apex:outputField value="{! rec.Discription__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>
Please mark it as best Answer if you find it helpful.
Thank You
Ajay Dubedi
Also i noticed <apex:page standardController="TaskTest__c" recordSetVar="records">
I don't have a TaskTest__c i don't think.
Any advice appreciated. Thank you
1. First, go to developer console and create new VF page then paste this code there.
2.<apex:page standardController="TaskTest__c" recordSetVar="records"> put your custom object name as TaskTest__c.
3.<apex:page standardController="task__c" recordSetVar="records"> just like this.
4. You don't need to create any custom button.
5. Also, you can check API name of fields of your custom object. The API name may vary from API name of fields I use in my code.
Let me know if any problem occurs again. If you find my solution beneficial then mark it as the best answer.
Thank You
Ajay Dubedi
Have you tried this?
http://dazeworks.com/appyninja/mass-update-edits-delete/
This is exactly what you are asking for.
Let me know if it helps.
What happens after that?
Because when i go to object "TASKS" i can NOT mass edit, so what i did is created a custom button "Mass Edit" (see below).
When i click on Mass Edit though, only 20 records appear. :( Please advice
If you get more than 20 records you need to create a custom controller and add your VF page. You can also use the custom button.
I will recommend you to start using trailhead to learn about Custom controller.
Please check URL below:
https://trailhead.salesforce.com/en/modules/visualforce_fundamentals/units/visualforce_custom_controllers
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_controller.htm
Thank You
Ajay Dubedi
(Could you give me your email please?)
What happens if i want to create an "update" VF for the same object? Could you please tell me how the code will change?