public PageReference deleteRecord ()
{
ID rid = ApexPages.currentPage().getParameters().get('ruleID');
String runQuery='select Name from Candidate__c where \''+rid+'\'';
List<Candidate__c> listdel = Database.Query(runQuery);
delete listdel;
PageReference deletepage=nePageReference('/apex/EmployeeDetailpageid='+userid);
tabOpt = 'empref';
deletepage.setRedirect(true);
return deletepage ;
}
-
What is the error/problem you are facing?– Sergej UtkoCommented Feb 4, 2015 at 10:04
-
I can deleting the record could not be retrieve the list on my tab"Employee Referral" .page can be loaded and redirect to my first panel. Actually I want to stop the page on tab "Employee Referral"– Harshal KolheCommented Feb 4, 2015 at 10:07
Add a comment
|
1 Answer
public PageReference deleteRecord()
{
ID rid = ApexPages.currentPage().getParameters().get('ruleID');
String runQuery='select Name from Candidate__c where id= \''+rid+'\'';
List<Candidate__c> listdel = Database.Query(runQuery);
delete listdel;
Candidate[Selectid,Name, Status__c,CreatedDate, Email_ID__c, Employee__c, Experience__c, Technology__c from Candidate__c WHERE Employee__c =: userid ];
PageReference deletepage=newPageReference('/apex/EmployeeDetailpageid='+userid);
tabOpt = 'empref';
deletepage.setRedirect(false);
return deletepage ;
}
-
Actually I only facing the problem on tab.I just want to stop my page after reload .This is my tab name "Employee Referral". Commented Feb 4, 2015 at 10:37
-