You need to sign in to do that
Don't have an account?

How can I change owner for multiple cases at once
Hi
How can I change owner for multiple cases at once
for ex ramu--->ravi
Regards.
You need to sign in to do that
Don't have an account?
Hi
How can I change owner for multiple cases at once
for ex ramu--->ravi
Regards.
Write a apex class
1) Fetch all cases with owner "ramu" (from your example) in a list
2) Then execute a for loop which will change the owner from "ramu" to "ravi"
3) Update that list.
Let me know if there is any problem in this approach.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
can you give me a sample code.
regards...
http://login.salesforce.com/help/doc/en/cases_massaction.htm
list<Case> tempCases = new list<Case>();
string oldOwnerId = '500abcd'; //use query to get the owner id;
string newOwnerId = '500xyz'; //use query to get new owner id;
for (Case c:[SELECT Id, OwnerId FROM Case WHERE OwnerId = :oldOwnerId) {
c.OwnerId = newOwnerId;
tempCases.add(c);
}
if (tempCases.size() > 0)
update tempCases;
Thanks