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

Custom Button: Create new case from VF Page

Hi Community


I want to create a button in my VF page that opens a "New Case" page in Edit mode with a specific Record Type.


I have created the following button for this but nothing happens when clicking on it:


<apex:commandButton value="New Onboarding Action" onclick="parent.location.href='/500/e?def_account_id={!Account.Id}&RecordType={!recordTypeId}';"/>


Thanks for your help

Parent may be null. Instead, use, which will always point to the main window frame.