• Jon Billings
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I have a trigger running that updates all chatter feed items to all with access however I can not figure out how to write the test class so we can deploy it in production. Any one able to help me out? I am skilled with salesforce process builder and other things but am just starting to dig into the apex triggers etc. 

Trigger; 

trigger RCTRL_Feed_share01 on FeedItem (after insert) {
    List<FeedItem> newFeeds= new List<FeedItem>();
    List<FeedItem> feeds=new List<FeedItem>();
    for(FeedItem fei: Trigger.new){
        feeds=[Select id, ParentId, Visibility From FeedItem Where id = :fei.Id];
        //System.debug('id is: ' + fei.Id);
     } 
    for(FeedItem fee:feeds)
    {
           fee.Visibility='AllUsers';
           newFeeds.add(fee);
    }
    
    Update newFeeds;
}
I have a trigger running that updates all chatter feed items to all with access however I can not figure out how to write the test class so we can deploy it in production. Any one able to help me out? I am skilled with salesforce process builder and other things but am just starting to dig into the apex triggers etc. 

Trigger; 

trigger RCTRL_Feed_share01 on FeedItem (after insert) {
    List<FeedItem> newFeeds= new List<FeedItem>();
    List<FeedItem> feeds=new List<FeedItem>();
    for(FeedItem fei: Trigger.new){
        feeds=[Select id, ParentId, Visibility From FeedItem Where id = :fei.Id];
        //System.debug('id is: ' + fei.Id);
     } 
    for(FeedItem fee:feeds)
    {
           fee.Visibility='AllUsers';
           newFeeds.add(fee);
    }
    
    Update newFeeds;
}

Can anyone help to solve this

 

How to relate a timba survey to a specific record. I am getting all the responses when I relate a survey to a oppurtunity record but I need only the response that got for that particular oppurtunity....in Summary , Tell me how to relate the timba survey record to a specific opprtunity record?

  • August 11, 2011
  • Like
  • 0