You need to sign in to do that
Don't have an account?
aditya prasad
How to prepopulate parent case field of a case using controller.
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
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
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.