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
case commentscase comments 

passing info to visualforce

I have a simple visualforce form that's asking a couple of questions.  I would like for this form to be launched from the Case object and have the Case number passed to visualforce page.

The custom fields of this visualforce page is using fields on another custom object.  I thought maybe I could have just created a custom button to launch the visualforce page, but the since the page was used using a custom object, it's not showing up when creating the custom button on the case object.

Any help would be greatly appreciated.  Thanks.
Balaji BondarBalaji Bondar
Hi,
You can create a case custom button of 'URL' type and have below URL:
/ApexpageName/CaseId={!Case.Id}&CaseNumber={!Case.CaseNumber}
Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.
case commentscase comments
Hi Balaji,

Thanks for the quick response.  That would pass the case number, but how could I then save that case number on the form?