Skip to main content
I am trying to retrieve a record name in my visualforce page, however it will only let me get the ID number.

I have tried putting {!Case.Name} with no luck - I get the error that the field does not exist.

<apex:page standardController="Case" renderAs="PDF" showHeader="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">

<head>

 <style> body { font-family: Arial Unicode MS; font-size:14px;}

 th {font-size:18px; padding-right:20px; font-weight:bold;}

 td{padding-right:20px;}

 span {font-weight:800;}

h3 {font-family: Arial Unicode MS; font-size:14px; font-weight:bold; text-decoration: underline; margin:0;}

.product {margin-bottom:30px; border:1px; border-style: solid;}

.img {

  display: block;

  margin-left: auto;

  margin-right: auto;

  width: 40%;

}

.inside {margin:20px;}

  </style>

</head>

<body>

<p class="img"><apex:image url="{!URLFOR($Resource.logo,'lf_logo.png')}" width="300px"/></p>

  

 <br></br>

Regarding your warranty case number   <apex:outputText value="{!Case.Id}"/> 

 
3 Antworten
  1. 17. Feb. 2020, 06:28
    Hi Craig

    Are you sure "Name" is a field on Case, i would advise you to check the field api.

    Case usually has "CaseNumber" as the standard field.

    Do let me know if you have any further query.

    P.S: Mark this as the best answer if this helped

    Thanks

    Shubham Kumar
0/9000