• Connor Reilly
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 5
    Replies
Hi all, 

I'm looking for a way to store merged account details (ie. the account id merging from and to, and the account name merging from and to). The purpose of this to inform another database that is communicating with Salesforce via the api.
Hi all, 

I'm looking to pouplate a multi-picklist field based on a text field. The text field would always have just one value in it. Is this something that is doable via flow/process builder or would it require an apex class?
Hello, 

I'm wondering if there is a way to auto-populate the related to field on a task? The goal would be for any activity logged to an opportunity, the related to field should auto populate to the contact that is assoicated with the opportunity. This way, the activity rolls up to the related contact activity as well. 

Thanks!
Hi, 

I have a requirement where I need to round robin leads to two groups of users (SDRs and Account Execs). If lead has xyz fields filled out, it should round robin to the account execs. However, if the fields are not filled out, it should round robin to SDRs. Has anyone seen a good way to do this?
I'm looking to track the true last sales activity date on the account/contact/opportunity levels. I'm unable to use just the LastActivityDate, as I need to filter out activity done by marketing user. Does anyone have suggestions on how to handle this?

I have a requirement where our Account Executives should only be able to transfer leads if:

a) they are the current owner
b) the current owner is "Marketing"

Their profile has tranfer abilities.
Here is the validation rule, but it is currently not working as expected. I'd appreciate any help. 
 

AND(ISCHANGED( OwnerId ),
PRIORVALUE(OwnerId) <> Owner:User.Id || Owner:User.Alias <> 'mkting',
OR($Profile.Name = 'Standard Fast Radius User', $Profile.Name = 'SDR'))
Looking to allow a profile to transfer accounts to their name only if the current account owner is a certian user. Our org wide setting on accounts is public read/write 

Hello, 

I'm trying to update a date/time field on the lead object. However, every which way I try to adjust the date, it throws an error. I've tried this via the import wizard and dataloader.io, both to no avail. I'd appreciate any help.
 

Error: 
 

INVALID_FIELD:Failed to deserialize field at col 2. Due to, '2018-09-11 02:26:00' is not a valid value for the type xsd:dateTime:First_Quote_Request_Time__c --
I have a trigger that is auto converting a new lead to a contact, opportunity, and account from a form submission. The leads are auto assigned from hubspot round robin. When it converts the lead, it's assigning it to a new person. I'd like to have the contact account and opportunity owner match the lead owner that it was converted from. below is the trigger currently. Any help would be appreciated. 
trigger ContactTrigger on Contact (after update) {
    if(trigger.isAfter) {
        List<Contact> contacts = trigger.new;
        
        Set<Id> acctIds = new Set<Id>();
        for(Contact contact : contacts) {
            acctIds.add(contact.AccountId);
        }
        List<Account> accounts = [Select Id, Name From Account Where Id in: acctIds];
        List<Opportunity> opportunities = new List<Opportunity>();
        User marketingUser = [Select Id, Name From User Where Name='Marketing' Limit 1];
        if(trigger.isInsert) {
            for(Integer i = 0; i < contacts.size(); i++) {
                if(!String.isEmpty(contacts[i].Which_Manuf_Service_Shall_We_Quot__c)) {
                    opportunities.add(createOpportunity(contacts[i], marketingUser, accounts));
                }
            }
        }
        if(trigger.isUpdate) {
            List<Contact> oldContacts = trigger.old;
            for(Integer i = 0; i < contacts.size(); i++) {
                if(!String.isEmpty(contacts[i].Which_Manuf_Service_Shall_We_Quot__c) && (oldContacts[i].Which_Manuf_Service_Shall_We_Quot__c != contacts[i].Which_Manuf_Service_Shall_We_Quot__c)) {
                    opportunities.add(createOpportunity(contacts[i], marketingUser, accounts));
                }
    		}
        }
        insert opportunities;
    }
    
    public Opportunity createOpportunity(Contact contact, User marketingUser, List<Account> accounts) {
        Date today = System.today();
        String tech = null;
        List<String> services = new List<String> {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'};
        List<String> serviceAbbreviations = new List<String> {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'I','j', 'k', 'l'};    
            for(Integer i = 0; i < services.size(); i++) {
                if(contact.Which_Manuf_Service_Shall_We_Quot__c.equals(services[i])) {
                    tech = serviceAbbreviations[i];
                }
            }
        tech = String.isEmpty(tech) ? 'Other' : tech;
        String accountName = '';
        for(Account account : accounts) {
            if(account.Id == contact.AccountId) {
                accountName = account.Name;
            }
        }
        System.debug('Contact: ' + contact);
        System.debug('Contact Account: ' + contact.Account);
        System.debug('Account Name' + accountName);
        Opportunity opp = new Opportunity();
                    opp.ContactId = contact.Id;
                    opp.AccountId = contact.AccountId;
                    opp.CreatedById = marketingUser.Id;
                    opp.StageName = 'Quoting';
                    opp.Name = 'RFQ - ' + accountName + ' (' + tech + ')';
                    opp.CloseDate = today.addDays(30);
        return opp;
    }
}

 
Hello, 
I'm trying to create a trigger to update a field based on the value of another field. The field I'm trying to update is a picklist and the values I'm trying to update it to are active picklist values. There are various HS_Original_Source__c values that if they are populated, I want the standard leadsource field to have it's equivilant value. Ex. HS_Original_Source__c is ORGANIC SEARCH and would map to leadsource of Organic Search.
 
trigger LeadSourceTrigger on Opportunity (before update, before insert) {
 List<Opportunity> oppList = new List<Opportunity>();
    
    //Go through the updated records coming into the database and update their custom fields 
    //according to the updated lead source 
    for(Opportunity opp : Trigger.new)
    {
        if(opp.LeadSource == '' && opp.HS_Original_Source__c != '' && opp.HS_Original_Source__c != 'OFFLINE')
        {
          if(opp.HS_Original_Source__c == 'ORGANIC SEARCH')
          {
               opp.LeadSource = 'Organic Search';
               System.debug('organic search');
           }
           /*
              if(opp.HS_Original_Source__c == 'next value')
          {
               opp.LeadSource = 'next value';
               System.debug('next value');
           }
           
           
            */
          
          //Put each updated record in the list created
          oppList.add(opp);  
        }
        
 }
 }

Any help would be much appreciated.
Hi, 

I have a requirement where I need to round robin leads to two groups of users (SDRs and Account Execs). If lead has xyz fields filled out, it should round robin to the account execs. However, if the fields are not filled out, it should round robin to SDRs. Has anyone seen a good way to do this?

I have a requirement where our Account Executives should only be able to transfer leads if:

a) they are the current owner
b) the current owner is "Marketing"

Their profile has tranfer abilities.
Here is the validation rule, but it is currently not working as expected. I'd appreciate any help. 
 

AND(ISCHANGED( OwnerId ),
PRIORVALUE(OwnerId) <> Owner:User.Id || Owner:User.Alias <> 'mkting',
OR($Profile.Name = 'Standard Fast Radius User', $Profile.Name = 'SDR'))
Looking to allow a profile to transfer accounts to their name only if the current account owner is a certian user. Our org wide setting on accounts is public read/write 
Hello, 
I'm trying to create a trigger to update a field based on the value of another field. The field I'm trying to update is a picklist and the values I'm trying to update it to are active picklist values. There are various HS_Original_Source__c values that if they are populated, I want the standard leadsource field to have it's equivilant value. Ex. HS_Original_Source__c is ORGANIC SEARCH and would map to leadsource of Organic Search.
 
trigger LeadSourceTrigger on Opportunity (before update, before insert) {
 List<Opportunity> oppList = new List<Opportunity>();
    
    //Go through the updated records coming into the database and update their custom fields 
    //according to the updated lead source 
    for(Opportunity opp : Trigger.new)
    {
        if(opp.LeadSource == '' && opp.HS_Original_Source__c != '' && opp.HS_Original_Source__c != 'OFFLINE')
        {
          if(opp.HS_Original_Source__c == 'ORGANIC SEARCH')
          {
               opp.LeadSource = 'Organic Search';
               System.debug('organic search');
           }
           /*
              if(opp.HS_Original_Source__c == 'next value')
          {
               opp.LeadSource = 'next value';
               System.debug('next value');
           }
           
           
            */
          
          //Put each updated record in the list created
          oppList.add(opp);  
        }
        
 }
 }

Any help would be much appreciated.