• Manikandan C 14
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Friends, I have created a visual force page with cancel button. but when i click cancel button the page ask me to fill  required fields. How Can i Overcome this . My requirement is when i click cancel button it has to go list view page. 

Here My code
Apex:

Public Pagereference docancel(){      
    PageReference pageRef = new PageReference('/001/o');   
    pageRef.setRedirect(true);
    return pageRef;   
    }
Friends, I have created a visual force page with cancel button. but when i click cancel button the page ask me to fill  required fields. How Can i Overcome this . My requirement is when i click cancel button it has to go list view page. 

Here My code
Apex:

Public Pagereference docancel(){      
    PageReference pageRef = new PageReference('/001/o');   
    pageRef.setRedirect(true);
    return pageRef;   
    }