Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.
Hi,

I have a button on case which calls a vf page and this vf will available only when some error occurs. Otherewise it directly create a child case using a controller. from action part of vf page.

But I want it should go to standard new page of a case from controller and parent case field should be populated with the casenumber from which I am trying to create a child case.

 pageRef = new PageReference ('/500/e?CFparent='+caseNumber+'&RecordType=01280000000HnUD');

I am using above code to for this. But I don't get desired result and it is being overidden by new button of case.

Any help on this.

Regards,

Aditya
1 answer
  1. May 6, 2016, 2:33 PM
    Hi Aditya,

    You got to pass parent ID value in the URL something like this :  

     parent.window.location.href ="/apex/NewLicensePageBMD?regnId={!RegistrationBMD__c.Id}

    Where RegistrationBMD__c is the parent object.   I used a visual force page to implement the same. You can apply this to standard page URL as well. 

     
0/9000