+ Start a Discussion
max.alexander1.3945796734965325E12max.alexander1.3945796734965325E12 

Mass edit all contacts in related list

HI,
I need ot edit all contacts in related lists using VF script, i got one of the site but it only does selected ones, is htere a way to select all of the contacts
here is code

<apex:page standardController="Contact" recordSetVar="unused" sidebar="false">
<apex:includeScript value="{!$Resource.UtilJS}" />
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlock >
Note: All modifications made on the page will be lost if Return button is clicked without clicking the Save button first.
</apex:pageBlock>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Return" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}"  var="a" id="table">
<apex:column headerValue="Name">
<apex:inputField value="{!a.Name}"/>
</apex:column>
<apex:column headerValue="Phone">
<apex:inputField value="{!a.Phone}"/>
</apex:column>
<apex:column headerValue="Mobile Phone">
<apex:inputField value="{!a.MobilePhone}"/>
</apex:column>
<apex:column headerValue="Email">
<apex:inputField value="{!a.Email}"/>
</apex:column>
<apex:column headerValue="Title">
<apex:inputField value="{!a.Title}"/>
</apex:column>
<apex:column headerValue="Account">
<apex:inputField value="{!a.AccountId}"/>
</apex:column>
<apex:column headerValue="Description">
<apex:inputField value="{!a.Description}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Best Answer chosen by max.alexander1.3945796734965325E12
Subramani_SFDCSubramani_SFDC
Try this Link

https://success.salesforce.com/answers?id=90630000000gjZTAAY
http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_massupdate.htm

Pls Mark as Answer if it help u.....

Regards,
Subramani
Trinay technology Solutions