Chatter related to one specific model row in tables?

SegSeg ✭✭
edited February 5, 2020 in Questions
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

Comments

  • rslackrslack ✭✭✭✭
    edited February 5, 2020
    You can do this by having a Row Action that calls a pop up.
    image
    image

    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. 
    image

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

    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.
    image
    I create a Page TItle on the page.
    I create a Page Template on the page. 
    image

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

    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!
  • SegSeg ✭✭
    edited August 31, 2016
    You are brilliant!!! Thanks so much, it worked like a charm!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!