You need to sign in to do that
Don't have an account?

Need help with simple visualforce page
Dear All,
I am creating a visualforce page which opens when we click on a 'Custom' button (/apex/CaseDetail?CaseId={!Case.Id}) placed on Case detail page. I am not able to pass the Account Name of the record into this custom page.
Below mentioned is the code - I am sure there is some issue with the code..
<apex:page showHeader="false" sidebar="false" standardController="Case">
<apex:form >
<apex:pageBlock title="Case Details" mode="maindetail">
<apex:pageBlockButtons location="top">
<apex:CommandButton value="Print" onclick="javascript:window.print(); return false"/>
<apex:CommandButton value="Close" onclick="window.close(); return false;"/>
</apex:pageBlockButtons>
<apex:pageBlockSection id="CaseSumary" columns="3" title="Case Summary" collapsible="true">
<apex:pageBlockSectionItem >
<apex:outputPanel >
<apex:outputLabel value="Account Name:" for="account"/>
<apex:outputField id="type" value="{!Case.AccountId}"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
And here is the screenshot of visual force page. You can see that I am not able to get value of the account record.

Thanks,
Manpreet Singh
I am creating a visualforce page which opens when we click on a 'Custom' button (/apex/CaseDetail?CaseId={!Case.Id}) placed on Case detail page. I am not able to pass the Account Name of the record into this custom page.
Below mentioned is the code - I am sure there is some issue with the code..
<apex:page showHeader="false" sidebar="false" standardController="Case">
<apex:form >
<apex:pageBlock title="Case Details" mode="maindetail">
<apex:pageBlockButtons location="top">
<apex:CommandButton value="Print" onclick="javascript:window.print(); return false"/>
<apex:CommandButton value="Close" onclick="window.close(); return false;"/>
</apex:pageBlockButtons>
<apex:pageBlockSection id="CaseSumary" columns="3" title="Case Summary" collapsible="true">
<apex:pageBlockSectionItem >
<apex:outputPanel >
<apex:outputLabel value="Account Name:" for="account"/>
<apex:outputField id="type" value="{!Case.AccountId}"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
And here is the screenshot of visual force page. You can see that I am not able to get value of the account record.
Thanks,
Manpreet Singh
All Answers
In the url, insted of Caseid put only id.
https://pratikmuno-dev-ed--pmunotdev.ap1.visual.force.com/apex/casesummary?id=5009000000CetFF
I just tried and it's working.
Thanks,
Pratik
Use Case.Account.Name to get name .
Let us know if it helps.
Do this Case have any account assigned to it? I guess this case is not having account associated with it.
Also you are refereing the AccountId field which will show accountId not the Account Name . You will need to use a extension with your page that will pull out the account name based on the accountId.
Even Case.Accountid will show account name.
Thanks,
Pratik
Quick question, this is in continuation to previous thread. I want to bring few selected fields on visual force page from related list of case record. Example
1) Emails - To, CC, BCC, Email Body
2) Open Activities - Created By, Assigned To, Subject, Comment, Status
Basically, I am trying to build custom Printable view but with better and less clutered UI. So, need details of every record under emails, Open Activities etc.Till now, I am using Standard Case Controller.
Thanks,
Manpreet Singh