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
n_pavan_kumar1n_pavan_kumar1 

Output Link to create a new Case

Hi,

 

There is a need to creata link to create a new case from the Visual force page.

 

The following code does it for account. 

 

<apex:outputLink value="{!URLFOR($Action.Account.New)}">
    Create New Account
</apex:outputLink>

But it does not work for the "Case" if we replace with "$Action.Case.New". It throws an error "Error: Field $Action.Case.New does not exist. Check spelling."

 

Please let us know why it doesnot  work for Case but for Account or Opportunities.

 

Thanks in advance!!

Pavan

Best Answer chosen by Admin (Salesforce Developers) 
kruti tandelkruti tandel

Hi,

for cases you can write down below code:

 

<apex:outputLink value="{!URLFOR($Action.Case.NewCase)}">
    Create New Case
</apex:outputLink>