Chatter related to one specific model row in tables?

  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hi,

I've got multiple areas in my pages where I would like to show the chatter feed for different rows in a table either through popups or drawers. Would anyone know how I can do that so that it shows the chatter for the row in context and not just the first model row? Also i have developed my own UI so would like it to appear as it does in Skuid not Salesforce.
thanks
Photo of Segolene Nicoloff

Segolene Nicoloff

  • 488 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
You can do this by having a Row Action that calls a pop up.



I personally use a Page Include in the popup.  I use a page include because I can easily reuse the page in other pages for that object without having to recreate it. 


You pass the ID of the record to the page include using the query string.  id={{Id}}


The page include has 1 model (the model of the object you are trying to see chatter on i.e. Account etc.).  The model has a condition set to Id= (param)id  the id page parameters and is set to always on. This allows the model to grab only the record you sent to it.

I create a Page TItle on the page.
I create a Page Template on the page. 


The template has this information in it:
<iframe frameborder=0 width="100%" height="800px" src="/apex/skuid__Social?id={{{Id}}}"/>


That's it.  When you click on the icon on your main page a pop up will show up that shows that objects chatter feed. Here is the XML code for my Client Page Include Chatter Feed (Client is Account in my ORG).

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="false">
    <models>
        <model id="ClientChatterPageInclude" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="Account">
            <fields>
                <field id="Id"/>
                <field id="Name"/>
            </fields>
            <conditions>
                <condition type="param" value="id" field="Id" operator="=" enclosevalueinquotes="true" novaluebehavior=""/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <pagetitle model="ClientChatterPageInclude" uniqueid="sk-1L8k3t-112">
            <maintitle>
                <template>{{Name}}</template>
            </maintitle>
            <subtitle>
                <template>{{Model.label}}</template>
            </subtitle>
            <actions/>
        </pagetitle>
        <template multiple="false" uniqueid="sk-1L8la5-115" model="ClientChatterPageInclude" allowhtml="true">
            <contents>&lt;iframe frameborder=0 width="100%" height="800px" src="/apex/skuid__Social?id={{{Id}}}"/&gt;</contents>
        </template>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>


I have a similar page set up for my Task Chatter feeds.  The only thing that changes is the Task is the Object in the Page include.  The template says the exact same thing in the Template field.

Good luck!
(Edited)
Photo of Segolene Nicoloff

Segolene Nicoloff

  • 488 Points 250 badge 2x thumb
You are brilliant!!! Thanks so much, it worked like a charm!