• Kishan Trambadiya
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 5
    Replies

I want to track the fields History that getting changed. i want the report that provide the old value of any field and also new value of that field.
Lets i want to track the keyword custom field. if changed the keyword than it will show the new value and also its old value.

Not sure where i am doing wrong. Simple one.... I have to search keywords same as previous update keywords

list<Chatter_Monitor_Keywords__c> obj = [SELECT SCK_Upload_Id__c,Chatter_Monitor_Policies_Level__c,Chatter_Monitor_Policy_Keyword__c from Chatter_Monitor_Keywords__c where id=:newSCK_id and CreatedByid=:UserInfo.getUserid()];

if(obj.size()>0)
{
string abc=obj[0].Chatter_Monitor_Policy_Keyword__c;
obj[0].Chatter_Monitor_Policy_Keyword__c=newSCK.Chatter_Monitor_Policy_Keyword__c;

update obj[0];

string s ='%'+ abc + '%';

List<Chatter_Monitor_Policy__c> records = ['Find \'' + Chatter_Monitor_Policy_Keyword__c +'\' IN Chatter_Monitor_Policy__c Fields RETURNING Chatter_Monitor_Policy__c(Chatter_Monitor_Policy_Keyword__c' ;
query+= 'Id,Chatter_Monitor_Policy_Keyword__c WHERE Chatter_Monitor_Policy_Keyword__c=:s)'];

if(records.size()!=null)
{
for(Integer i=0;i<records.size();i++)
{
records[0].Chatter_Monitor_Policy_Keyword__c = s;
update records[0];
}
}

i want to update same keyword as above update.
Chatter_Monitor_Policy__c - Custom Object
Chatter_Monitor_Policy_Keyword__c - field of Chatter_Monitor_Policy__c custom object.

Here i given the SOQL code for update and that generating the compile error like field 'Chatter_Monitor_Policy_Keyword__c' can not be filtered in query call.

string abc=obj[0].Chatter_Monitor_Policy_Keyword__c;
string s ='%'+ abc + '%';
List<Chatter_Monitor_Policy__c> records = [SELECT Id, Chatter_Monitor_Policy_Keyword__c from Chatter_Monitor_Policy__c where Chatter_Monitor_Policy_Keyword__c Like:s and CreatedById =: UserInfo.getUserId()];
if(records.size()!=null)
        {
            for(Integer i=0;i<records.size();i++)
            {
                     records[0].Chatter_Monitor_Policy_Keyword__c = s;
                     update records[0];
            }
   

I want to add feed object into object and also wants to give an error when it proceed.

I want a trigger that is fire at the time when user send the private message to aother user. so through that trigger i can use a class to store private conversation. I have ChatterMessage Standard Object but i cant use any trigger on it. I also made the permission "Manage Chatter Messages" then after i am not able to make trigger on chattermessage sobject.

I want to use the fields of the chatter message object. so i made an instance of chatter message but then where i have to make a trigger for chatter messenge??

//list
public List<ChatterMessage> filterChatterMessage(List<ChatterMessage> cm)
    {
        system.debug('filterChatterMessage:'+cm);
        return filterBody(fm);
    }

public List<SObject> filterBody(List<SObject> sobjs)
     {
     for (SOBject feedObject: sobjs)
     {
           
     if(feedObject instanceOf ChatterMessage)
     {
       body = ((ChatterMessage)feedObject).Body;
       ConversationId = ((ChatterMessage)feedObject).ConversationId;
       SenderId = ((ChatterMessage)feedObject).SenderId;                
       SentDate = ((ChatterMessage)feedObject).SentDate;
                
     }
     else
     {
      ........
      }

so where i have to make a trigger for chatter message??
            

I want to track the fields History that getting changed. i want the report that provide the old value of any field and also new value of that field.
Lets i want to track the keyword custom field. if changed the keyword than it will show the new value and also its old value.

Here i given the SOQL code for update and that generating the compile error like field 'Chatter_Monitor_Policy_Keyword__c' can not be filtered in query call.

string abc=obj[0].Chatter_Monitor_Policy_Keyword__c;
string s ='%'+ abc + '%';
List<Chatter_Monitor_Policy__c> records = [SELECT Id, Chatter_Monitor_Policy_Keyword__c from Chatter_Monitor_Policy__c where Chatter_Monitor_Policy_Keyword__c Like:s and CreatedById =: UserInfo.getUserId()];
if(records.size()!=null)
        {
            for(Integer i=0;i<records.size();i++)
            {
                     records[0].Chatter_Monitor_Policy_Keyword__c = s;
                     update records[0];
            }
   

Hi

 

I am new to development.

 

I have a  custom object  Add, contains three fields num1, num2, result.

 

i want to write a trigger for addition of num1 and num2.

 

when i enter num1 and num2 the result field will be automatically displyed.

 

Regards

 

Is there a way to set up a private group and only have one admin have access?  We currently have 4 admins and there is a requirement to set up a Private Group for Executive's and only have one of the admins have access.  The way I understand it is that all admins can see the Chatter in Private groups.  Thanks


Rob