• D0T
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 29
    Replies

Hi there, 

 

Can someone guide me or help me accomplish the following? 

 

I would like to have an email alert sent to the Account owner when an event is associated to it for a spcific oppertunity. 

 

for example, 

 

An Agent who is working with a referred client (who is owned by someone else in the company to sell a product that pretains to his line of business) asks the his assistant to book a meeting for him, I would like a notice to go out to the actual account owner notifying them of the meeting Date and Time ..etc   

 

 

Thanks.

  • February 09, 2012
  • Like
  • 0

Hi, 

 

Getting " Update failed. First exception on row 1; first error: MISSING_ARGUMENT, Id not specified in an update call: []" error when trying to do a bulk update on the Team Member Role . from "Technical Analyst" to "Benefit Analyst" to ensure the code below is activated.

 

Please help.

 

-------------------

 

trigger trgAfterTeamMember on Company_Team__c (after insert, after update) {
    
    Set<Id> accountIds = new Set<Id>();
    List<Account> accountsToUpdate = new List<Account>();
    
    for(Company_Team__c tm : trigger.new) {
        //if(tm.Team_Member_Role__c == 'Analyst' || tm.Team_Member_Role__c == 'Benefit Analyst') {
            //accountsToUpdate.add(new Account(Id = tm.Company__c, Analyst__c = tm.Team_Member__c));
        //}
        accountIds.add(tm.Company__c);
    }
    
    if(!accountIds.isEmpty()) {
        for(id i : accountIds) {
            accountsToUpdate.add(new Account(Id = i));
        }
        database.update(accountsToUpdate);
    }
    //if(!accountsToUpdate.isEmpty()) {
    
        //try {
        //    database.update(accountsToUpdate);
        //}
        //catch(Exception e) { System.debug(' Error: ' + e ); }
    //}
}

  • November 30, 2011
  • Like
  • 0

Hi,

 

I uploaded Accounts then I uploaded Cotnacts, the contacts birthdate are completely wrong. What is the simplest way to correct this? I checked the excel files that I used to upload the Data, but not sure what happened with Dataloader, funny thing is that the Birthday's are only off by either couple of months, years or days??

 

Thanks in advance

  • September 07, 2011
  • Like
  • 0

Hi,

 

I uploaded Accounts then I uploaded Cotnacts, the contacts birthdate are completely wrong. What is the simplest way to correct this? I checked the excel files that I used to upload the Data, but not sure what happened with Dataloader, funny thing is that the Birthday's are only off by either couple of months, years or days??

 

Thanks in advance

  • September 07, 2011
  • Like
  • 0

User "A" is part of a Team Role when selected a field is prepopulated with User "A" Name. Reminders User "A" based on a Date Forumals which is quartely based.

 

Users were able to recieve them and now it stopped however it is working for only one users. Not sure whats going on. See Code below.

 

global class GenerateQuarterlyRemindersBatchable implements Database.Batchable<SObject>, Database.Stateful {

    global Database.QueryLocator start(Database.BatchableContext bc) {
    
        return Database.getQueryLocator([SELECT Id, Name, Elapsed_Months__c, Next_Effective_Send_Date__c, Account.Final_Interval__c, Account.Analyst__c FROM Opportunity WHERE Requires_Reminder__c = 1]);

    }

    global void execute(Database.BatchableContext bc, List<SObject> batch){
        
        List<Opportunity> opportunitiesThatNeedReminders = new List<Opportunity>();
        
        List<Task> taskRemindersToCreate = new List<Task>();

        for(Opportunity o : (List<Opportunity>) batch) {
            
            System.debug('Old Opportunity: '+o);

            //Update opp details
            Opportunity oTemp = new Opportunity(Id = o.Id);
            
            oTemp.Next_Effective_Send_Date__c = o.Next_Effective_Send_Date__c.addMonths(math.round(o.Account.Final_Interval__c));
            oTemp.Elapsed_Months__c = o.Elapsed_Months__c + o.Account.Final_Interval__c;
            
            System.debug('New Opportunity: '+oTemp);
            
            opportunitiesThatNeedReminders.add(oTemp);
        
            //Create task details
            Task t = new Task();
            t.OwnerId = o.Account.Analyst__c;
            t.Subject = 'Quarterly Report Reminder';
            t.Description = '';
            t.WhatId = o.Id;
            t.ActivityDate = o.Next_Effective_Send_Date__c.addMonths(1);
            
            System.debug('Task: ' + t);
            
            taskRemindersToCreate.add(t);
        
        }
        
        //UPDATE OPPS, INSERT REMINDER TASKS
        if(!opportunitiesThatNeedReminders.isEmpty() && !taskRemindersToCreate.isEmpty()) {
            try {
                database.update(opportunitiesThatNeedReminders);
                database.insert(taskRemindersToCreate);
                
            }
            catch(Exception e) { System.debug('Error: ' + e); }
        }
        
    }
    
    global void finish(Database.BatchableContext bc) {}

 

 

Thanks,

A.Y

  • August 23, 2011
  • Like
  • 0

Record owner has the same profile as the person trying to delete the record.

 

Under profile premissions user is allowed to modify, delete etc on Oppertunity, Contacts, Lead and Accounts Objects.

 

Sharing Settings has been set to READ/WRITE between Group who has the same profile.

 

I do not wish to set Modify All on either specific objects or orgonization wide, is there a diffrent solution to this?

 

Thank you.

  • August 22, 2011
  • Like
  • 0

I've just deployed the Birthday reminder code and modified it based on our needs. I've tested the APEX code and everything works fine - however we have 9000 clients and would like the default value for the checkbox to be "checked". I've editted the custom field, however the value on the client page still remains unchecked, am I doing something wrong?

 

Thanks

A.Y

  • August 15, 2011
  • Like
  • 0

Hi,

 

I’ve created email alerts on custom fields designed to send an email to a clients and agents summarizing an appointment ( date/time, location, requirements, and agenda and the agent who’s seeing the client) however this could not have been possible on the calendar due to “by design”, therefore when staff are putting the information they have to put it in twice, (one in the customized fields to generate the email and second is in the calendar for agents so that it shows up on thier BB, main Calendar)

 

We had an issue where 2 different dates have been entered for 1 meeting and created a conflict, I’m trying to eliminate this and I think a task alert would do it but I was wondering if someone had some insight on this.

 

Appointments get re-scheduled all the times, meaning more practical work with salesforce - is there a better solution to automate this?

 

Thank you in advance.

  • December 01, 2010
  • Like
  • 0

Hi there, 

 

Can someone guide me or help me accomplish the following? 

 

I would like to have an email alert sent to the Account owner when an event is associated to it for a spcific oppertunity. 

 

for example, 

 

An Agent who is working with a referred client (who is owned by someone else in the company to sell a product that pretains to his line of business) asks the his assistant to book a meeting for him, I would like a notice to go out to the actual account owner notifying them of the meeting Date and Time ..etc   

 

 

Thanks.

  • February 09, 2012
  • Like
  • 0

Hi, 

 

Getting " Update failed. First exception on row 1; first error: MISSING_ARGUMENT, Id not specified in an update call: []" error when trying to do a bulk update on the Team Member Role . from "Technical Analyst" to "Benefit Analyst" to ensure the code below is activated.

 

Please help.

 

-------------------

 

trigger trgAfterTeamMember on Company_Team__c (after insert, after update) {
    
    Set<Id> accountIds = new Set<Id>();
    List<Account> accountsToUpdate = new List<Account>();
    
    for(Company_Team__c tm : trigger.new) {
        //if(tm.Team_Member_Role__c == 'Analyst' || tm.Team_Member_Role__c == 'Benefit Analyst') {
            //accountsToUpdate.add(new Account(Id = tm.Company__c, Analyst__c = tm.Team_Member__c));
        //}
        accountIds.add(tm.Company__c);
    }
    
    if(!accountIds.isEmpty()) {
        for(id i : accountIds) {
            accountsToUpdate.add(new Account(Id = i));
        }
        database.update(accountsToUpdate);
    }
    //if(!accountsToUpdate.isEmpty()) {
    
        //try {
        //    database.update(accountsToUpdate);
        //}
        //catch(Exception e) { System.debug(' Error: ' + e ); }
    //}
}

  • November 30, 2011
  • Like
  • 0

Hi,

 

I uploaded Accounts then I uploaded Cotnacts, the contacts birthdate are completely wrong. What is the simplest way to correct this? I checked the excel files that I used to upload the Data, but not sure what happened with Dataloader, funny thing is that the Birthday's are only off by either couple of months, years or days??

 

Thanks in advance

  • September 07, 2011
  • Like
  • 0

Record owner has the same profile as the person trying to delete the record.

 

Under profile premissions user is allowed to modify, delete etc on Oppertunity, Contacts, Lead and Accounts Objects.

 

Sharing Settings has been set to READ/WRITE between Group who has the same profile.

 

I do not wish to set Modify All on either specific objects or orgonization wide, is there a diffrent solution to this?

 

Thank you.

  • August 22, 2011
  • Like
  • 0

I've just deployed the Birthday reminder code and modified it based on our needs. I've tested the APEX code and everything works fine - however we have 9000 clients and would like the default value for the checkbox to be "checked". I've editted the custom field, however the value on the client page still remains unchecked, am I doing something wrong?

 

Thanks

A.Y

  • August 15, 2011
  • Like
  • 0