Skip to content

Instantly share code, notes, and snippets.

@keirbowden
Created July 20, 2013 11:55
Show Gist options
  • Save keirbowden/6044766 to your computer and use it in GitHub Desktop.
Save keirbowden/6044766 to your computer and use it in GitHub Desktop.
Visualforce page for a Publisher action that posts case information to an account feed.
<apex:page standardcontroller="Account" extensions="ChatterAccountSnapshotExt">
<apex:form >
<apex:pageMessages />
<apex:pageBlock title="Service Snapshot">
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="Post to Feed" action="{!post}" />
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Closed Cases" />
<apex:outputText value="{!closedCases}" />
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="New Cases" />
<apex:outputText value="{!newCases}" />
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Open Cases" />
<apex:outputText value="{!openCases}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:outputPanel rendered="{!posted}">
<script>
window.top.location='/{!Account.id}';
</script>
</apex:outputPanel>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment