You need to sign in to do that
Don't have an account?
Arun K
EnhancedList------I want to remove records from sobject using enhancedlist
I want to remove records from sobject using enhancedlist.
iam looking for that functionality.Anyone who can help in this regard would be great
You cannot do that using out-of-the-box functionality.
Yes,
I want to remove records from one object from enhancedlist and add it to other object..
yes,I will do that
thanks for the reply
then what should i do to make that custom functionality.
Please help me in this regard.
Create a visualforce and implement the list view/edit/delete functionality on that. Implement search criteria so that you can filter and delete all records that satisfy your conditions.
I managed to create the visualforce and apex class, and managed to make a list button
But I stuck in remove the seleted records...
I think I need add some functionality in apex class for the list button
My visualforce page is------
<apex:page controller="view">
<h1>{!$User.FirstName} </h1>
<table><tr><td>
<apex:pageblock >
<apex:enhancedList type="custom object" height="750" rowsPerPage="200">
<apex:facet name="header">
</apex:facet>
</apex:enhancedList>
<apex:form >
<apex:commandButton value="Remove from custom object" action="{!remove}" />
</apex:form>
</apex:pageblock>
</td>
<td>
<h1>This map shows the locations of Accounts who are in <b>{!$User.FirstName}</b> Location.</h1>
<apex:includeScript value="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=salesforce.com"/>
</td>
</tr></table>
<h1><apex:outputText value="{!count}"/></h1>
<b/>
<apex:pageBlock >
<apex:enhancedList listid="xxxxxxxxxxx" height="400" customizable="false"/>
<h1><apex:outputText value="{!accountcount}"/> </h1>
<apex:form >
<apex:commandButton value="custom object" action="{!add}" />
</apex:form>
</apex:pageBlock>
</apex:page>
My apex class is------
public with sharing class view {
public view() {
}
public view(ApexPages.StandardController controller) {
}
public String getUser() {
return null;
}
public PageReference add() {
return null;
}
public integer getAccountcount() {
return [Select count() from Account ];
}
public integer getCount() {
return [Select count() from call_plan__c ];
}
public PageReference remove() {
return null;
}
}
Please help in this regard.
Thanks for that, I added wrapper class in my class
I selected few records and when I clciked "remove from object" button which is in visualforce page records are not removing.
should I need to add few customization??
this is the exact code which is in org
Vf page------
<apex:page controller="view">
<!--<head>
<apex:includeScript value="{!URLFOR($Resource.jQuery, '/js/jquery-1.4.2.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jQuery, '/js/jquery-ui-1.8.6.custom.min.js')}" />
<apex:stylesheet value="{!URLFOR($Resource.jQuery, '/css/ui-lightness/jquery-ui-1.8.6.custom.css')}" />
<script>
$("div.listViewport div.x-panel-body a").live("click", function(){
var sURL = $(this).attr("href");
if (sURL.indexOf("?") != -1) {
sURL += "&isdtp=mn";
} else {
sURL += "?isdtp=mn";
}
window.open(sURL, "Manage", "width=1000,height=700,menubar=1,resizable=1,scrollbars=1,status=1,location=1");
return false;
});
</script>
</head> -->
<h1>{!$User.FirstName} Call Plan</h1>
<table><tr><td>
<apex:pageblock >
<apex:enhancedList type="call_plan__c" height="750" rowsPerPage="200" customizable="false">
<apex:facet name="header">
</apex:facet>
</apex:enhancedList>
<apex:form >
<apex:commandButton value="Remove from Call Plan" action="{!remove}" />
</apex:form>
</apex:pageblock>
</td>
<td>
This map shows the locations of Accounts who are in <b>{!$User.FirstName}'s</b> Location.
</td>
</tr></table>
<h1><apex:outputText value="{!count}"/></h1>
<b/>
<apex:pageBlock >
<apex:enhancedList type="call_plan__c" height="400" rowsPerPage="200" customizable="false"/>
<h1><apex:outputText value="{!accountcount}"/> </h1>
<apex:form >
<apex:commandButton value="Add to Call Plan" action="{!add}" />
</apex:form>
</apex:pageBlock>
</apex:page>
My apex calss after adding ur wrapper class---
public with sharing class view {
public view() {
}
public class accList{
public Account objacc {get; set;}
public Boolean selected {get; set;}
//This is the contructor method. When we create a new cContact object we pass a Contact that is set to the con property.
// We also set the selected value to false
public acclist(Account a) {
objacc = a;
selected = false;
}
}
public view(ApexPages.StandardController controller) {
}
public String getUser() {
return null;
}
public PageReference add() {
return null;
}
public integer getAccountcount() {
return [Select count() from Account ];
}
public integer getCount() {
return [Select count() from call_plan__c ];
}
public PageReference remove() {
return null;
}
}
Please add customization that I need to do..??
If u want I can send my look and feel of my vf page
Delete using the logic below
Hi,
I need a requirement which calculates no of records that are shown in enhancedlist(records are shown 50 out of 120) and according to that horizontalbar should be displayed.
If i remove records from enhancedlist, the horizontalbar should update
Can I know to do this.??
Hi,
I need a requirement which calculates no of records that are shown in enhancedlist(records are shown 50 out of 120) and according to that horizontalbar should be displayed.
If i remove records from enhancedlist, the horizontalbar should update
Can I know to do this.??
i want to hide listbuttons from listviewport.How is it possible?any idea?
Goto
setup--> respective object->search layout--> object name list view -->> Uncheck the buttons that are not required
thanks