I have created a list button which is mapped to vf page /apex/NewProblem, This button i made visible on case related list of problem object. enter image description here

So whenever i remove the id from button url it is showing vf page as given below but issue is when i pass case id into url it is giving me error as "Id value 5001q00000174vD is not valid for the SC_Problem_Management__c standard controller" . I am passing this value because it should appear on Case field of vf page. But it is not doing so, i have tried many times to resolve it facing same issue again and again.

vf page snap: enter image description here


You'll need to arrange for a different variable to be used. The id parameter is always reserved for the standard controller.




<apex:page standardController="SC_Problem_Management__c" extensions="PM_Controller" ...


public with sharing class PM_Controller {
  ApexPages.StandardController sc;
  public PM_Controller(ApexPages.StandardController con) {
    sc = con;
    SC_Problem_Management__c record = (SC_Problem_Management__c)con.getRecord();
    record.Case__c = ApexPages.currentPage().getParameters().get('caseId');
| improve this answer | |
  • Thanks @sfdcfox. i was getting error because of id parameter which is resolved now. – Admin Feb 7 '19 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.