Skip to main content
Is there any way I can post to a parent record's chatter feed when a child record is created / edited? Ex - post to the Account feed when a contact is created?

 

I'm aware of the 'All Related Objects' checkbox in Feed Tracking but do not want to use an all / nothing approach.
답변 4개
  1. 2016년 3월 21일 오후 8:52
    James,

     

    You can do this with a mix of Process Builder and Visual Flow though it can be a bit cumbersome to get the items setup correctly.  If you haven't used either of them then I highly recommend that you take the Process Automation modules on Trailhead that cover the basics for each of these tools. https://developer.salesforce.com/trailhead/en/module/business_process_automation

     

    You will first need to create a visual flow that essentially just creates a chatter post.  Note that you will need to create an input variable which defines the Account Id where you want this post to appear.  The following example double checks that the value of the Account Id variable has been set (which is used in the Record Create step) and, if so, proceeds to create a new Feed Item.

     

    James, You can do this with a mix of Process Builder and Visual Flow though it can be a bit cumbersome to get the items setup correctly.

     

    As show below, I used a fairly simple string "A new contact was added" as the body of the Chatter post.  You could greatly expand on this by using a text template to include additional information that makes the content more relevant to your specific needs.  

     

    User-added image

     

    After you have the flow designed as expect you will need to save and activate it so that it is visible to you via Process Builder.

     

    The process builder structure should look something like this:

     

    1. Define a process builder entry that is based on the 'Contacts' object which only fires when new records are created.

     

    2. Perform an evalutation on the new record to ensure that it is associated with an account. (Verify that Account Id was not null -- this is necessary for any private contacts or items that might sync from external systems that don't require an account id)

    User-added image

    3. Define an Immediate Action that starts your flow.  In this sample, I pass the AccountId from the newly created Contact to the Visual Flow that was defined earlier and let it create the chatter post.

    User-added image

     

    Once the process builder criteria and action configuration is complete just save the item and active it to begin testing. 

     

    Based on the level of customization you need, it may be quicker to look at the app that Vinay linked to rather than building this out in your org but the information here should work for you if you decide to test it out for yourself.
0/9000