• 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 date field last_Modified_date__c on Account object. I am writing a before upate trigger, and some part of the code must execute only when last_Modified_date__c != NULL. I get the error 'Invalid field for Sobject Account when i refer the last modified field. How can I overcome this situation and check the null vlaue in the trigger for date field?

 

Thank You in advance for your help.

 

  • November 25, 2013
  • Like
  • 0

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,

 

In Tasks, i have a standard pick list field called "Type". The pick list values are Sales call, client visit, Email, Other. Other is the default value and E-mail is the send e-mail default value. Some of our users are syncing client calls into salesforce from outlook but the type is defaulting to Other in salesforce. Is there a way, that the users can appropriately choose the type of the task when syncing it from outlook to salesforce?

 

 

Thank You in advance for the help.

 

Hi,

 

I am trying to assign the recurring tasks from one user to another. I tried updatin the Assigned to field using data loader but it throwed an error "You cannot reassign a recurring task occurrence." Please suggest me a way to change the owner of these tasks.

 

 

Thank you in advance for the help.

 

 

  • March 20, 2013
  • Like
  • 0

Hi,

 

One of the user in our company is getting an error called "An internal server error has occured while processing your request. Url:https://login.salesforce.com/services/soap/c/13.0." How can I get his offline edition working again.

 

Thank you in advance for your help.

 

  • March 08, 2013
  • Like
  • 0

Hi,

 

We have dupe catcher installed for our organization. I have batch loaded a list of leads using the import wizard. Dupecatcher did not stop the duplicate records from entering into salesforce. In appexchange I found that dupe catcher will not stop the duplicate records when a mass upload using data loader or import is done. What is the solution for me to upload a batch of loads and still want the dupe catcher working?

 

 

Thank You for your help in advance.

  • February 18, 2013
  • Like
  • 0

Currencies in our organization are loaded in 2010. Users are complaining about the change in exchange rates. If I update the exchnage rate under manage currencies section manually, will it impact the records created prior to this update?

 

Thank You in advance for the help.

  • February 14, 2013
  • Like
  • 0

I have a related list called Notes and attachments in Accounts. For every note and attachment a checkbox called active is present to represent the status. I have to create a functionality to display only active notes and attachments. I also have to create a checkbox or some other field called "show all records", and when the user selects that checkbox, all active and inactive notes and attachments must be displayed.

 

Thank You in advance for the help.

  • February 14, 2013
  • Like
  • 0

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.

  • February 13, 2013
  • Like
  • 0

Hi,

 

I have a custom setting that includes five picklist values. This custom setting is referred  in a trigger. The trigger  will not allow user to delete once a value is selected. I want to add another picklist value to the existing custom setting. Can I just do it by going into Custom Setting and click on the new button and add the pick list value. I want even this picklist value to be referred in the trigger. Should I be making any changes in the trigger, after I update the picklist value in the custom setting.

 

 

 

Thank You in advance for the help.

 

 

 

  • February 11, 2013
  • Like
  • 0

Hi,

 

I have a picklist field called Job Category. The user can select any value in the picklist but the user cannot edit or delete some categories once they are selected. This functionality is done using triggers and validation rules. I want a visualforce page that should display a warning message "Job category of this type cannot be edited or deleted. Do you want to Proceed?" I want this page to be displayed when the user selects any one of the picklist value that cannot be edited or deleted. Can some one please provide the code for VF page that provides this functionality??

 

Thank You in advance for the help.

  • February 10, 2013
  • Like
  • 0

Hi,

 

I got a request from the user to turn off an auto assignment rule which is present on Leads. How can I do that?

 

 

Thank You in advance for the help.

  • February 08, 2013
  • Like
  • 0

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.

 

 

  • February 08, 2013
  • Like
  • 0

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...

  • February 07, 2013
  • Like
  • 0

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.

  • February 13, 2013
  • Like
  • 0

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.

 

 

  • February 08, 2013
  • Like
  • 0

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...

  • February 07, 2013
  • Like
  • 0

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