You need to sign in to do that
Don't have an account?
symantecAP
Button redirect
I am creating a button on a home page which wud take me to VF PAGE which shows a Case record in a particular Queue.
I created a button "Accept" and when we click the button it shud get redirected to that case.i am able to get the record on the VF page but however not able to redirect to that record from the VF Page
when iam trying to click Accpet button it takes me toURL which has both record type id and id ...but i juss need id from the queue
Here is the code..
public class Getnextcase { public PageReference Accept() { List<Case>cas; id caseid; cas = [Select id from case c where ownerid=:'00G30000000lZ39' limit 1]; string url = 'https://cs1.salesforce.com/'; url+=Cas ; PageReference nextpage = new pagereference( url); return nextpage; } List<Case> Cases; public List<Case> getCases(){ Cases = [Select id,casenumber,account.name,contact.name,CreatedDate,Subject,Status from case where Ownerid=:'00G30000000lZ39' order by CreatedDate ASC limit 1]; return cases; } }
try this:
All Answers
try this:
Thank you
I have modified the code.. I need to change the caseowner on the click of the Accpet button ..the code is saved but i am unable to change the case owner field to the current user.
Thanks again
According to the code you are returning to the page before inserting or updating the case.
u r ryt vanessan...i have used the update command and it works fine ....thank u ..