You need to sign in to do that
Don't have an account?
nwing
Embed Visualforce component With Case Links IN Dashboard
I can embed a Visualiforce list in a dashboard.
I can embed a hyperlink in a visualforce page.
Is it possible to embed a list with a hyperlink in a visualforce component that you want to include in a Dashboard? Specifcally I want to show a list of case numbers and their status, and have the case number be a hyperlink to the case itself, right from the dashboard........
I haven't seen anything that say I cannot do that, but nothing that appears to lead me to believe I can yet either.......
Thanks for any help on this one....
<apex:column> <a href="/{!c.Id}" target="_blank"/> </apex:column>
All Answers
I see no reason why that wouldn't work.
Try it.
Here was my first shot.... and so far it is not working..... (VF and Apex Controller)
The dashboard does give me a chart with what appears to be links, but they all hyperlink to this
https://c.na1.visual.force.com/servlet/servlet.Integration?lid=066300000009DW5&ic=1#
and it doesn't work......obviously.
I am not quite sure how to embed the links within a visualforce list........if you have any ideas PLEASE let me know.... this would be a good win........
<apex:page controller="retrieveCase" tabStyle="Case">
<apex:pageBlock >
{!contactName}'s Cases
<apex:form >
<apex:pageBlockTable value="{!cases}" var="c">
<apex:column value="{!c.status}"/>
<apex:column value="{!c.Account.Name}"/>
<apex:column >
<apex:facet name="header">Link</apex:facet>
<apex:commandLink >
{!c.Id}
<apex:param name="cid" value="{!c.URLToCase__c}"/>
</apex:commandLink>
</apex:column>
</apex:pageBlockTable>
</apex:form>
</apex:pageBlock>
</apex:page>
}
public List<Case> getCases() {
return [SELECT Case.Account.Name, status, subject, Id, URLToCase__c FROM Case
WHERE Case.RecordType.Name = 'Trouble Ticket' AND Status != 'Closed' limit 5];}
}
You don't need a commandlink and a roundtrip to the underlying class and it's methods.
Just output a html link <a href='/500300000a73xyz'/> where you point to the case Id.
Remember : a detail page is just the id of the object in the url.
I have gotten this to work...... but of course it looks like crud......functionally it does what I want, but I need the URLToCase field to be represented within the CaseNumber....instead of spreading out the VF component.....
I have tried to use the a href, but it doesn't work out..... and as of yet I have not found a viable example.......
Almost there........
<apex:page controller="retrieveCase" tabStyle="Case"> <apex:pageBlock > {!contactName}'s Cases <apex:form > <apex:pageBlockTable value="{!cases}" var="c"> <apex:column value="{!c.status}"/> <apex:column value="{!c.URLToCase__c}"/> <apex:column value="{!c.CaseNumber}"/> </apex:pageBlockTable> </apex:form> </apex:pageBlock> </apex:page>
On this visualforce markup for the VF Dash Component, would you be able to point me to how to embed the link in the case number? Instead of having to display the entire link?
That is the only obstacle at this point.....
<apex:column> <a href="/{!c.Id}" target="_blank"/> </apex:column>
Maybe I am not doing this quite right, but here is what I have done...... and the addition didn't have any effect on the format or function.......
I will keep digging...... this looks to be a really cool capability, but it sure is not coming easily....
thanks,
<apex:page controller="retrieveInstallCases" tabStyle="Case"> <apex:pageBlock > {!contactName}'s Install Cases <apex:form > <apex:pageBlockTable value="{!cases}" var="c"> <apex:column value="{!c.status}"/> <apex:column value="{!c.CaseNumber}"/> <apex:column > <a href="/{!c.Id}" target="_blank"/> </apex:column> <apex:column value="{!c.Account.Name}"/> <apex:column value="{!c.URLToCase__c}"/> </apex:pageBlockTable> </apex:form> </apex:pageBlock> </apex:page>