• jack huang
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 1
    Questions
  • 2
    Replies
We are now using some chatteranswers tags(chatteranswers:feeds,chatteranswers:feedfilter,chatteranswers:searchask,chatteranswers:datacategoryfilter) in VF page for the forum disscussion. 
But recently we know that the Chatter Answers Retires in Winter ’18 (see: https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_chatter_answers_eol.htm),
My question doubt is: Is there any new tags about the chatter questions that we can use them to replace the chatteranswers tags?
If no tags for chatter questions, does that means we need to develop the similar functions by ourselves? that will be huge effort to develop one forum.  

After adding component to Home page layout . it is not displaying on Home page . I have given view permissions on Artcles , Knowledge Articles . 

I have this trigger and if I test it, it will be send 2 email to the same "to address" why??

Where is the problem?

 

I try to change the event "before update" into "after update" but is the same, if I try to write after update and before update, the trigger send 4 emails!!

 

thanks

 

 

trigger nametrigger on Opportunity (before update) { list<opportunity> list_opp = new List<opportunity>(); for (opportunity o : Trigger.new) { list_opp.add(o); } list<opportunity> list_opp_old = new List<opportunity>(); for (opportunity o_old : Trigger.old) { list_opp_old.add(o_old); } if (list_opp.get(0).fieldx__c == true & list_opp.get(0).fieldx <> list_opp_old.get(0).fieldx ){ Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); String[] toAddresses = new String[] {'testemail@xxx.com'}; mail.setToAddresses(toAddresses ); mail.setReplyTo('testemail@xxx.com'); mail.setSenderDisplayName('testsender@xxx.com'); mail.setSubject('fax'); mail.setPlainTextBody(''); Attachment Att = [Select body, name from attachment where parent.id = :list_opp.get(0).id and name like 'richiestace%' order by lastmodifieddate desc limit 1]; Messaging.EmailFileAttachment[] fileAttachments = new Messaging.EmailFileAttachment[1]; Messaging.EmailFileAttachment fileAttachment = new Messaging.EmailFileAttachment(); fileAttachment.setBody(Att.body); fileAttachment.setFileName(Att.name); fileAttachments[0] = fileAttachment; mail.setFileAttachments(fileAttachments); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); } }

 

 

I'm using a datatable in VF and I can normally get it to populate via my controller.  However, I need a dynamic variable in my SOQL to have the end user sort by the choice of headers in the table and I apparently keep passing NULL values to the string.  I'm a rookie with Apex and a novice with VF when it comes to working with Controllers, so I'm trying to figure out how to pass the myString value from VF to the SOQL in my Controller (code listed below).  Ideally I'd like to send this info via a commandlink in the column headers within in the datatable, but I'm fairly open to suggestions.  Thoughts?

Controller:

public class dataTableOli {
public String myString {get;set;}
String myquery =       
            'SELECT id,Opportunity.Product_Name__c,Opportunity.Account.Name,Opportunity.Account.Agency_Names__c,Opportunity.Account.Customer_Number__c,Opportunity.Account.Agency_Customer_ID__c,unitprice,opportunityid,Opportunity.StageName,Opportunity.Name,Opportunity.id,Opportunity.Previous_Expire__c,Opportunity.Previous_Amount__c,Opportunity.Product_Tier__c,Opportunity.Add_Print_Subscription__c,Name ' +
            'FROM OpportunityLineItem ' +
            'WHERE Opportunity.Account.Agency_Names__c=\'001j000000R7b8s\' and CALENDAR_YEAR(Opportunity.Previous_Expire__c) =2017 and CALENDAR_MONTH(Opportunity.Previous_Expire__c) =12  and Opportunity.Previous_Amount__c > 0 '+
            'ORDER BY '+MyString+ ' ASC Limit 10';
            
List<OpportunityLineItem> oli;
    public List<OpportunityLineItem> getoli() {

if(oli==NULL) 
   oli=Database.query(myquery);

      return oli;
}
   }

 

After adding component to Home page layout . it is not displaying on Home page . I have given view permissions on Artcles , Knowledge Articles .