• Virija
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 9
    Replies

Hi,

 

I have a custom field Called "Active" on the Contact object. Users in our organization will "Uncheck" the Active Check box if they feel that the contact is no longer valid. 

 

Now a user creates an opportunity and tries to add Opportunity Contact roles and by default salesforce will display all the contacts that are under the Account from which the opportunity is created. Users sometimes will add Inactive contacts as an opportunity contcats role. 

 

1. Is there any way to prevent the Inactive contacts from appearing at the Opportunity Contact role (Something similar to a Lookup filter) so hat the user will not have an option to add inactive contact as the contact role?

 

2. If the aboove is not possible, can I wriite a trigger on Opportunity contact role object to throw an error when a user tries to add Inactive Contact as a contact role?

 

Thank You in advance for your help.

Hi,

 

Below is the snippet of the code that I am using to send single e-mails to the users in my organization. For the first we hit a daily limit of 500 e-mails and the users are unable to approve the process and also receoive the e-mails. My requirement is not to send external e-mails but to send e-mails to users in my organization. Do i have to make any changes in the code to avoid hitting the limit?

 

I came to know that the single e-mail limit will be hit only when we try to send e-mail to external e-mail addresses. Do I have to make any changes in my query to prevent this scenario?

 

Thank You in advance for the help.   

 

 

public static void sendEmailToProgTeam(Id objId,string status,Id progId,string OpsBillingName)
    {
        OpsBillingproc__c TestToBeUpdated = new     OpsBillingproc__c();
        TestToBeUpdated = [Select Id,name,ApprovalComments__c,customownerid__c from  OpsBillingproc__c where id=:objId];
        
        
        List<ProgramTeamMember__c> lstProgTeam = new List<ProgramTeamMember__c>();
        List<User> lstUser = new List<USer>();
        Set<Id> setUserId = new Set<Id>();
        
        lstProgTeam = [select id,TeamMemberId__c,RelatedprogramId__c from ProgramTeamMember__c where RelatedprogramId__c = : progId]; 
         if(lstProgTeam!=null)
         {
             for(ProgramTeamMember__c obj : lstProgTeam)
             {
                  setUserId.add(obj.TeamMemberId__c);
             }
         }
         
         Program__c objProg = [select id,ownerid from Program__c where id = : progId];
         
         if(objProg !=null)
         {
             setUserId.add(objProg.ownerid);
         }
         lstUser = [select id,name,email from User where id IN : setUserId];        
         
         List<String> toAddress= new List<String>();
         
          string body='';
          
          for(User u : lstUser)
          {
               toAddress.add(u.email);
          }        
          
          //if S&M approver rejectes the record
          if(Status == 'Complete')
          {
                 Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();                     
                         body ='<html><body><pre>';
                         body += 'Dear Users';
                         body += '<br/><br/>This is to inform you that the OpsBilling Record \''+ OpsBillingName +'\' has been Approved.';
                         body += '<br/><br/>Approval Comments : '+TestToBeUpdated.ApprovalComments__c;
                         body += '<br/></br>Kind Regards';          
                         body += '<br></br>Salesforce App Team';
                        mail.setSubject('OpsBilling Record Approved');                    
                        mail.setToAddresses(toAddress);                                      
                        mail.sethtmlbody( body );                       
                        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });                     
                        
          }            
         

Hi,

 

I got a compliant from the user that he is unable to use cross filter in the report. I also saw the report and found that he is unable to add cross filter as it is not available for selecting. What might be the reason? Will using joined reports solve the problem.

 

 

Thank you in advance.

Hi,

 

I have a custom picklit field called Job Category. I have added three new picklist values and also replaced an old picklist value. How to deploy these changes to production? Can we do this using change sets or should I repeat the same procedure in production environment like the way I did in Sandbox?

 

 

Thanks in advance for the help.

 

 

Hi I am new to salesforce. I am facing a diffcult situation with a validation rule that is involving picklist values. I have a Picklist field called XYZ category. I have 7 different picklist values like Phase, emergency, authorized, operations, other, members, procedures. Phase, emergency, authorized, operations can be considered as important for the sake of scenario. I want a validation rule that should allow users to pick any of the 7 values in the xyz category which normally happens. I do not want the users to change the category if they once select Phase, emergency,authorized, operations. If they select anything from the other three and they wish to edit and change it to another category the system should allow saving the record. If they change the category from other or procedures or members to the important ones it should allow saving, but if they wish to change from the phase or emergency or authorized or operations to any ther category, the system should not allow saving the record.

 

 

I am trying to solve it using Priorvalue, ischanged......but I am not reaching the solution. Can some one help me please...

I feel this would be an easy trigger to make, I'm not just a programmer of any sorts.  Here is what I need it to do:

When the parent record (contact) is updated or created, update all child records for partner_member__c.  There won't be anymore than 4 child records in the largest case.  

If anyone could help me with this I'd appreciate it!

Thanks,
Blake