• dsingh16
  • NEWBIE
  • 25 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies

Hi

I have trigger that needs to be run only once. The trigger would change the owner of a case based on the status the user chooses for the Case.Status meaning Case.Owner would assinged to the user  choosing Case.Status="Research/Follow Up". My code is

 

// Class Declaration
public class RecursionBlocker{
   public static Boolean flag = true;
}

 and the associated Trigger is

Trigger CaseStatusResearchFollowUp on Case (after update) {
   if(RecursionBlocker.Flag = true){
           RecursionBlocker.Flag = false;
          for(Case c :trigger.new) {
    if( ((String)c.Status) == 'Research/Follow Up' ) c.OwnerId = UserInfo.getUserId();
    }
    }
}

What happens is that the trigger runs for the first time correctly. Whenever a user visit the case and tries to unlock it, the trigger fires again and assigns the user unlocking the case as its owner.

How to prevent the trigger not to fire again when the user is just unlokcing the record and not editing / changing anything within the case?

Hi, 

 

I have some fields I want to add up in an E-mail Template. One of them is a Check-Box Field. 

I want to add an option that if the check box is marked by the Sales Rep, a certion Text will appear on the E-mail Template. 

 

Say the Check Box is: "USA" AND It's marked, I want the Text: " You live in the USA" to appear in the E-mail template.. 

Same thing with a Text field. If a certion Text field is not Blank, I want to add the field to the E-mail Template along with a defualt text. For example: 

Text field: "USA" 

E-mail Temlate: (The place you live in is) "USA". () = defualt.  

 

How do I do that? 

 

BTW I have the Proffesional version of Salesforce... 

Hi

I have trigger that needs to be run only once. The trigger would change the owner of a case based on the status the user chooses for the Case.Status meaning Case.Owner would assinged to the user  choosing Case.Status="Research/Follow Up". My code is

 

// Class Declaration
public class RecursionBlocker{
   public static Boolean flag = true;
}

 and the associated Trigger is

Trigger CaseStatusResearchFollowUp on Case (after update) {
   if(RecursionBlocker.Flag = true){
           RecursionBlocker.Flag = false;
          for(Case c :trigger.new) {
    if( ((String)c.Status) == 'Research/Follow Up' ) c.OwnerId = UserInfo.getUserId();
    }
    }
}

What happens is that the trigger runs for the first time correctly. Whenever a user visit the case and tries to unlock it, the trigger fires again and assigns the user unlocking the case as its owner.

How to prevent the trigger not to fire again when the user is just unlokcing the record and not editing / changing anything within the case?

i want to create chatter feed for user through java using rest api ??
how can i do this ??

I need to override the css styling of the user profile page. The overriding of css is mostly stuff like changing page background color from blue to red, changing page font to Verdana 9pt etc. I have already done sfdc css overriding using custom component with custom css attached to the left sidebar. See following image for example.

 

However few of the sfdc pages in the org do not have left sidebar or right side bar div's, like chatter, user profile etc. I want to know if anyone has ever tried customizing css for these pages.

 

Another solution that I can think of is creating vf pages for showing user profile and redirecting the user to that vf page instead of the standard user profile page, but I dont know how this can be achieved or is it even possible.

Help is much appreciated.