1
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 ;

        } 
2
  • What is the error/problem you are facing? Commented 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" Commented Feb 4, 2015 at 10:07

1 Answer 1

0
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 ;

    } 
2
  • 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
  • disable developer mode not working. Commented Feb 4, 2015 at 10:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .