function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amy B.ax1058Amy B.ax1058 

Visualforce Page

I have created a VForce page to mirror a form.  Our users will simply be entering data into several rows and columns.  I have been able to hook the VForce page to the object "Case".  How do I get the results the users type in the text field to attach back to the case for reporting purposes?  For example, we have CaseA that requires a shipment to be returned.  When this is the case, the user will click on the custom button to take them to the VForce page designed to capture the details.  There could be 3 different products being returned.  Once the information for the 3 products is entered and saved how do I get that linked back to the Case?  Thanks for any help or advice.

Avidev9Avidev9
Well not sure what you want to do. Are you using standard controller or extension ?
If you are using standard controller and you are calling the standard save it will always return you to the detail page.

For an extension you have to return a pagereference from your save method something like.

public Pagereference saveMethod(){
//do your stuff here
return new Pagereference('/'+caseId); //caseId variable contains the case Id
}
Amy B.ax1058Amy B.ax1058

Thank you for the reply.  I was using a Standard Controller as I have no previous experience with VForce pages.  I've never used an extension.  

 

We are trying to capture additional details from a case.  The idea is to be able to capture several "detail objects" in the VForce page to hang off the case.  I can't figure out how to have the detail objects attach to the original case.