• adiaz
  • NEWBIE
  • 80 Points
  • Member since 2010

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 26
    Replies

Hi - I have a custom object called campaigns (separate from the standard object) where I want to roll up the revenue of all opportunities associated with the campaign. I've looked around for sample triggers but have not found anything close to it. Help is appreciated. Thanks!

Every time I change the account owner on an account, all of the owners on open opportunity change as well. How can I prevent this from happening? Help is appreciated!

 

One of my users some how activated Salesforce Mobile (paying version). Is there a way an admin can switch him to Mobile Lite from the configuration? Also - is there a way to restrict users to mobile lite only? 

 

Thanks,

 

Adrian

Is it possible to have an email service apex that will update an existing record in a custom object? I'm not a coder but would really appreciate it if someone can guide me to a similar code I can use to develop this functionality. Thanks!

Hello,

 

I have a trigger that creates is supposed to create a new record based on a status field of a different custom object. When i run the trigger, it creates 2 new records in the second custom object. Help solving why it is creating two instead of one is appreciated.

 

My code below:

 

Trigger:

 

 

trigger CreateTicket on Maintenance_Request__c(after update)

{

    if(Trigger.isUpdate){
        for(Maintenance_Request__c m: Trigger.new)

       {

          if(m.Status__c == 'Pending Support')

          {

               Support_Team_Request__c st = new Support_Team_Request__c();

              

                  st.Your_name__c = m.Your_Name__c;
                  st.Client_reported_issue__c = 'No';
                   st.Short_description__c = m.Short_Description__c;
                   st.Client_Name__c = m.Client_Name__c;
                   st.Description_of_Issue__c = m.Detailed_Description__c;
                    st.Mailbox__c = m.Mailbox__c;
                    st.Priority__c = 'medium';
                    st.Created_From_MTR__c = 'Yes';
                    st.Request_Type__c = 'production' ;  
                    st.Participant_Name__c = m.Participant_Name__c;
                    st.Participant_ID__c = m.Participant_ID__c;
                    st.CC_Contact__c = m.CC_Contact__c;

                insert st;

          }
         
        }
    }  

}

 

 

 

Test Class:

 

 

@isTest
private class CreateTicketTriggerTest {

    static testMethod void myUnitTest() {
      
        Maintenance_Request__c mr = new Maintenance_Request__c();
    
        mr.Your_Name__c = 'Test User';
    mr.Short_Description__c = 'Test request';
    mr.Client_Name__c = '0015000000GibFx';
    mr.Detailed_Description__c = 'Test maintenance request';
    mr.Mailbox__c = 'test@example.org';
    mr.Participant_Name__c = 'Test Participant';
    mr.Participant_ID__c = '123';
      mr.Request_Type__c = 'Account Merge';
        mr.Request_Type__c = 'Account Merge';

        
    insert mr;
        
        mr.Status__C = 'Pending Support';
    update mr;
    }
}

 

 

Okay I've written my code and tested it in my sandbox; works as expected. When I tried to move it to production, I ran a the deployement test and I received the following msg: "Coverage of selected Apex Trigger is 0%...." . Can someone help me write a test class?

 

Below is my Trigger Code:

 

 

trigger CreateTicket on Maintenance_Request__c(after update)

{

    if(Trigger.isUpdate){
        for(Maintenance_Request__c m: Trigger.new)

       {

          if(m.Status__c == 'Pending Support')

          {

               Support_Team_Request__c st = new Support_Team_Request__c();

               //do your stuff, for ex

                  st.Your_name__c = m.Your_Name__c;
                  st.Client_reported_issue__c = 'No';
                   st.Short_description__c = m.Short_Description__c;
                   st.Client_Name__c = m.Client_Name__c;
                   st.Description_of_Issue__c = m.Detailed_Description__c;
                    st.Mailbox__c = m.Mailbox__c;
                    st.Priority__c = 'medium';
                    st.Created_From_MTR__c = 'Yes';
                    st.Request_Type__c = 'production' ;  
                    st.Participant_Name__c = m.Participant_Name__c;
                    st.Participant_ID__c = m.Participant_ID__c;
                    st.CC_Contact__c = m.CC_Contact__c;

                insert st;

          }
         
        }
    }  

}

Hi Guys,

 

           what is the way to transfer the records by using salesforce to salesforce, i established the connection between two business users and iam able to add the objects and fields using the template but iam not sure how to transfer the records........Any kind of help is appreciated.

I have followed the instructions on how to get this working. I send test emails to the email service address created by salesforce when I activated the Email-to-Case and it does not create a case. I looked at the System Log and there is no entry regarding this. Any ideas why this is happening?

 

Thanks,


AD

I created 2 custom objects as a logging tool; Suppor Ticket and Maintenance Requests.

 

I have a field called type in the maintenance object. I would like a new entry to be created in the support ticket object if the field Type (in maintinance object) is changed to Support Required. Is this possible without Apex coding?

For who's interested: we (not Salesforce.com!) created an improved version of the Excel Addin with the following improvements:

 

1. Enhanced login-screen: easier switching between environments (less typing)
2. Validation rules are applied by default (by using newer api version)
3. Fixed error on duplicate columns (required custom fields were downloaded twice)
4. Removed default query on 'systemModeDate > [last 7 days]' if no filter criteria were filled in
5. Increased standard batch size from 50 to 200, improving upload performance
6. Removed checks on maximum amount of lines
7. Improved dates handling (sometimes downloaded dates would not upload back into salesforce again)

(update 2012-12-04, 2 more fixes)

8. ability to upload numberic fields as null instead of always 0

9. corrected the bug to cope with error when uploading numbers with many decimals. These were put into scientific notation in Excel but not loaded properly to SF

(update 2013-05-03, 1 fix)

10. ability to query more than 32766 rows (was hitting the VBA limit on Integer size)

 

Our users are very happy with it. Feel free to try it out or further build on it and let me know what you think:

http://code.google.com/p/improved-excel-addin/

 

Disclaimer: Though we made and tested all enhancements with great care, we take no responsibility for the consequences of the use of this tool. Also note that this is an open source tool and not maintained nor supported by Salesforce.com.

 

Regards,

Guy

As stated on other messages, I realize that this is not a supported App.  However, we are using Beta Chatter and I have followed the steps to install this app - GoogleAlertstoChatter.  It was easy to configure and in theory is very well received by our Sales and Management.  Not sure yet if it is working, since it is not clear where the notifications will be listed - I assume in the Chatter Notifications.   One problem issue is that whenever I do a merge of Accounts or Contacts, whether using Salesforce directly or Demand Tools, I am getting the following error email.  I need to know if this has to do with our Email Server, GoogleAlertstoChatter email, or something else with the APEX class. 

 

Apex script unhandled exception by user/organization: 00500000006uBVl/00D00000000heIs

Failed to invoke future method 'public static void executeGoogleAlertsCallouts(LIST:String, LIST:String, LIST:String)'

caused by: System.NullPointerException: Attempt to de-reference a null object

Class.GoogleAlertToChatter.executeGoogleAlertsCallouts: line 239, column 63 External entry point

Debug Log:

 

Any help or suggestions would be greatly appreciated.