• Richard Rodriguez 1
  • NEWBIE
  • 25 Points
  • Member since 2016
  • IT Systems Manager
  • RecruitWest Pty Ltd


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 5
    Questions
  • 11
    Replies
I was hoping somebody could help me with the code for a Trigger, or a Schedulable Class that can run after hours, and a Test Class (if applicable?!) for creating a record, or records, based on selections made from a multi-select picklist.

Okay, so this is what we're dealing with...

On a Contact record (eg. 003000000000001) there's a multi-select picklist field called Skill Codes (ts2__Skill_Codes__c) made up of various job skills (eg. 'Auto Electrician', 'Blast Crew', 'Blast Hole Driller', 'Bobcat Op', 'Boilermaker', etc.).

On a custom object called Short List (ts2__s_UserList__c) there are multiple records named for each of the Skill Codes (eg. a0D000000000001 = 'Auto Electrician', a0D000000000002 = 'Blast Crew', a0D000000000003 = 'Blast Hold Driller', a0D000000000004 = 'Bobcat Op', a0D000000000005 = 'Boilermaker', etc.).

Connecting the two objects is another custom object called Short List Link (ts2__s_UserListLink__c) which is made up of several records (eg. a0C000000000001, a0C000000000002, a0C000000000003, etc.) that only contain two fields, a Contact lookup field (ts2__r_contact__c) and a Short List lookup field (ts2__r_user_list__c).

And this is what needs to happen...
  1. User edits Contact record 003000000000001
    1. Updates Skill Codes to 'Blast Crew' and 'Boilermaker'.
    2. Saves the Contact record.
  2. [ Code works its magic ]
    1. Creates a Short List Link record a0C000000000001.
    2. Auto-assigns the Contact (ts2__r_contact__c) field to '003000000000001'.
    3. Auto-assigns the Short List (ts2__r_user_list__c) field to the matching record id for 'Blast Crew' > 'a0D000000000002'.
    4. Saves the Short List Link record.
    5. Creates a Short List Link record a0C000000000002.
    6. Auto-assigns the Contact (ts2__r_contact__c) field to '003000000000001'.
    7. Auto-assigns the Short List (ts2__r_user_list__c) field to the matching record id for 'Boilermaker' > 'a0D000000000005'.
    8. Saves the Short List Link record.
  3. COMPLETED.
We already have rules in place preventing the same Contact from being linked to the same Short List, so if a Short List Link already exists with that combination, I'd expect the trigger to still run, but fail for the creation of that Short List Link record... but still continue to create the remaining unique Short List Link records, if applicable.

I have also thought about the possibility of deleting the Short List Link when a User REMOVES the matching Skill Code from the Contact record, but that's getting a little too complicated for what I need right now.

I would normally use Process Builder for something like this, but there are 78 options in Skill Codes multi-select picklist, so the process would be way too big.

I know practically nothing about coding, so fully coded answers would be greatly appreciated.

Thanks.
I have a Custom (Managed) object called Individual Email Result (et4ae5__IndividualEmailResult__c) which contains a Lookup field to a Contact record (et4ae5__Contact__c) and I want to create a schedulable Apex Class to execute daily and update all of the related Contact records (with specific data from the fields of the Individual Email Result record) when it detects that a particular Individual Email Result checkbox (MC_ANY_Sent__c) equals 'true'.

Here is the code that I have so far: 
public class MCANYSent implements Schedulable, Database.Batchable<sObject>{

    public void execute( SchedulableContext context )
    {
        Database.executeBatch( this );
    }

    public Database.QueryLocator start( Database.BatchableContext context )
    {
        return Database.getQueryLocator
        (   'SELECT Id, MC_ANY_Sent__c, et4ae5__DateSent__c, Name, et4ae5__FromName__c, et4ae5__FromAddress__c, et4ae5__Contact__c'
        +   'FROM et4ae5__IndividualEmailResult__c'
        +   'WHERE MC_ANY_Sent__c = true'
        );
    }

    public void execute( Database.BatchableContext context, List<et4ae5__IndividualEmailResult__c> individualemailresults )
    {
        for ( et4ae5__IndividualEmailResult__c ier : individualemailresults )
        {
            ier.et4ae5__Contact__r.MC_Date_of_Last_ANY_Sent__c = ier.et4ae5__DateSent__c;
            ier.et4ae5__Contact__r.MC_Last_Email_Title__c = ier.Name;
            ier.et4ae5__Contact__r.MC_Last_Email_Sender__c = ier.et4ae5__FromName__c + '(' + ier.et4ae5__FromAddress__c + ')';
        }
        update individualemailresults.et4ae5__Contact__c;
    }

    public void finish( Database.BatchableContext context )
    {
        // nothing to do here
    }
}
However, when I try to save this, I am getting the following error;
Error: Compile Error: Variable does not exist: et4ae5__Contact__c at line 25 column 39

Line 25 is the 'update individualemailresults.et4ae5__Contact__c;' line.

I don't need to update the Individual Email Result record, as it isn't being changed, so I'm only looking to update the Contact record in the Lookup field (et4ae5__Contact__c), which is the default Salesforce Contact object, where all of the changes have been made.

Any ideas? 
I'm trying to create an Apex Class that checks all Account records on a daily basis and sends an email to the email field on ones that have a review due on that date.

For example:
Vendor ABC Pty Ltd has opted in for reviews (Vendor Review: Reminders = true), has an annual review date set in their record (Vendor Review: Date = 17/02/2019), and an email address set in their record (Vendor Review: Email = abc@test.com).

Here is my code:
global class VendorReviewCronJob implements Schedulable{ 
    
        global void execute(SchedulableContext SC) {
            sendmail();
        }

        public List<Id> getVendorReviewEmailAddresses(Integer Month, Integer Day) 
        { 
            List<Id> mailToIds = new List<Id>();
             
            Account[] a = [SELECT Id, Vendor_Review_Email__c, Vendor_Review_Date__c, Vendor_Review_Reminders__c
                            FROM Account 
                            WHERE DAY_IN_MONTH(Vendor_Review_Date__c) = : Day 
                            AND CALENDAR_MONTH(Vendor_Review_Date__c) = : Month   
                            ];
        
            for(Account recipient : a) {
                    
                    System.Debug('\n*******Found VendorReview Recipient');
                                        
                    if (recipient.Vendor_Review_Reminders__c == true)
                    {
                        mailToIds.add(recipient.Id);
                        System.Debug('\n*******Recipient: '+ recipient.Vendor_Review_Email__c);
                         
                    } else {
                        System.Debug('\n*******NO Recipient');
                    }
                
            }

            return mailToIds;
        }




        public void sendMail() 
        {
      
            String debugAddress = 'eyewell@salesforce.com';
            String VendorReviewEmailTemplateName = 'User_Vendor_Review_Required';       
            String debugMessage;
            String[] toAddresses;

            Integer DayOfEvent   = date.today().day();
            Integer MonthOfEvent = date.today().month();

            List<Id> VendorReviewIdsList = getVendorReviewEmailAddresses(MonthOfEvent,DayOfEvent);

            EmailTemplate VendorReviewTemplate = [select Id,Name,Subject,body from EmailTemplate where DeveloperName = :VendorReviewEmailTemplateName];
 
            if(VendorReviewTemplate != null && VendorReviewIdsList.isEmpty() == false)
            {

                Messaging.MassEmailMessage VendorReviewMail = new Messaging.MassEmailMessage();
    
                VendorReviewMail.setTargetObjectIds(VendorReviewIdsList);
                VendorReviewMail.setTemplateId(VendorReviewTemplate.Id);
                VendorReviewMail.setUseSignature(false);
                VendorReviewMail.setSaveAsActivity(true);

                try {
                    Messaging.sendEmail(new Messaging.MassEmailMessage[] { VendorReviewMail });
                }catch(Exception e)
                {
                    System.Debug(e);
                }
           
            }
            else
            {
                System.Debug('VendorReviewCronJob:sendMail(): Either an email template could not be found, or no Account has a Vendor Review today');
            }

                
        }

    
}
I've scheduled the apex class to run daily, but although it's showing that it has run, the emails for the reviews due that day haven't sent, and I also haven't received the confirmation email of how many were sent.

Admittedly, I got the base of the code from a mailer that was checking for birthdays on a Contact object, but I felt the same principles still applied.

Can anybody see where I've gone wrong?
I have created a Triggered Send using Marketing Cloud Connector, but when I click the [ Activate ] button, I'm getting the following error:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client', faultstrnig:'System.NullPointerxception: Attempt to de-reference a null object

(et4ae5)',}

Any ideas?
We are attempting to create our first Triggered Send via the Salesforce Marketing Cloud Connector, but besides encountering several issues that we had to overcome, we are now stuck with an error that we haven't been able to find a solution for.

1. We updated to the latest Marketing Cloud Connector package
2. Configured the Marketing Cloud Connector to enable the Referral (ts2__Application__c) object
3. Created the Triggered Send
4. Clicked [ Activate ]
ERROR: Before activating a triggered send the appropriate Apex Trigger must be created for the following object: TS2__APPLICATION__C. Please refer to Marketing Cloud Help for more information.
5. As per https://help.salesforce.com/articleView?id=mc_co_configure_objects_and_triggers.htm&type=5, created Apex Trigger in sandbox (Trig_Application)
trigger Trig_Application on ts2__application__c (after insert, after update) { et4ae5.triggerUtility.automate('ts2__application__c'); }
6. As per https://help.salesforce.com/articleView?id=mc_co_test_object_triggers.htm&type=5, created Apex Test Class in sandbox (Test_Trig_Application)
{
  private static testmethod void ApplicationTriggerTest()
  {     
           insert new et4ae5__Configuration__c(et4ae5__Support_Ticket_Recipient__c = 'example@example.com');
           Test.startTest();
           ts2__Application__c c = new ts2__Application__c(ts2__Job__c='a0x6F00000Jusxj',ts2__Candidate_Contact__c='0039000000tbvxG');
           // Insert contact
           insert c;
           // If no exceptions occurred, it was successful 
           System.assert(!String.isBlank(c.Id));
           Test.stopTest();
  }
}
ERROR: Compile Error: Unexpected token '{'. at line 1 column 1
7. As per https://developer.salesforce.com/forums/?id=906F0000000DC95IAG, updated the Apex Test Class in sandbox (Test_Trig_Application)
@isTest
  private class Test_Trig_Application {
  static testMethod void validateTrig_Application() {    
           insert new et4ae5__Configuration__c(et4ae5__Support_Ticket_Recipient__c = 'example@example.com');
           Test.startTest();
           ts2__Application__c c = new ts2__Application__c(ts2__Job__c='a0x6F00000Jusxj',ts2__Candidate_Contact__c='0039000000tbvxG');
           // Insert Application
           insert c;
           // If no exceptions occurred, it was successful 
           System.assert(!String.isBlank(c.Id));
           Test.stopTest();
  }
}
8. As per https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_deploy.htm, created Outbound Changeset including Trig_Application and Test_Trig_Application
9. As per https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_deploy.htm, deployed Inbound Change Sets with Test Option 'Default'
ERROR: 10 Test Failures
10. As per https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_deploy.htm, deployed Inbound Change Sets with Test Option 'Run specified tests' - Test_Trig_Application
ERROR: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Trig_Application: execution of AfterInsert caused by: et4ae5.MCBaseException.InvalidParameterException: Whoops! Marketing Cloud Connect does not have access to the selected object. Contact your administrator to enable objects for Marketing Cloud Connect triggered sends. Class.et4ae5.triggerUtility.automate: line 30, column 1 Trigger.Trig_Application: line 1, column 1: [] 
Stack Trace: Class.ApplicationTriggerTest.validateTrig_Application: line 14, column 1
11. As per https://salesforce.stackexchange.com/questions/210508/unable-to-deploy-trigger-for-triggered-sends-to-activate, updated Trig_Application
trigger Trig_Application on ts2__Application__c (after insert, after update)
{
    if (!Test.isRunningTest()){
        et4ae5.triggerUtility.automate('ts2__Application__c');
        }
}
12. As per https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_deploy.htm, deployed Inbound Change Sets with Test Option 'Run specified tests' - Test_Trig_Application
ERROR: The following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
Trig_Application
13. As per https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_deploy.htm, deployed Inbound Change Sets with Test Option 'Default' - SUCCESS
14. Clicked [ Activate ]
ERROR: A problem with the OnClick JavaScript for this button or link was encountered:
{faultcode:'soapenv:Client', faultstring:'System.NullPointerException: Attempt to de-reference a null object
(et4ae5)',}

So, as far as I can tell, this would be the last step in finalising the process.

I contacted Salesforce with regards to this error, but they referred me here, as we are not on a Premier Success plan.
I'm trying to create an Apex Class that checks all Account records on a daily basis and sends an email to the email field on ones that have a review due on that date.

For example:
Vendor ABC Pty Ltd has opted in for reviews (Vendor Review: Reminders = true), has an annual review date set in their record (Vendor Review: Date = 17/02/2019), and an email address set in their record (Vendor Review: Email = abc@test.com).

Here is my code:
global class VendorReviewCronJob implements Schedulable{ 
    
        global void execute(SchedulableContext SC) {
            sendmail();
        }

        public List<Id> getVendorReviewEmailAddresses(Integer Month, Integer Day) 
        { 
            List<Id> mailToIds = new List<Id>();
             
            Account[] a = [SELECT Id, Vendor_Review_Email__c, Vendor_Review_Date__c, Vendor_Review_Reminders__c
                            FROM Account 
                            WHERE DAY_IN_MONTH(Vendor_Review_Date__c) = : Day 
                            AND CALENDAR_MONTH(Vendor_Review_Date__c) = : Month   
                            ];
        
            for(Account recipient : a) {
                    
                    System.Debug('\n*******Found VendorReview Recipient');
                                        
                    if (recipient.Vendor_Review_Reminders__c == true)
                    {
                        mailToIds.add(recipient.Id);
                        System.Debug('\n*******Recipient: '+ recipient.Vendor_Review_Email__c);
                         
                    } else {
                        System.Debug('\n*******NO Recipient');
                    }
                
            }

            return mailToIds;
        }




        public void sendMail() 
        {
      
            String debugAddress = 'eyewell@salesforce.com';
            String VendorReviewEmailTemplateName = 'User_Vendor_Review_Required';       
            String debugMessage;
            String[] toAddresses;

            Integer DayOfEvent   = date.today().day();
            Integer MonthOfEvent = date.today().month();

            List<Id> VendorReviewIdsList = getVendorReviewEmailAddresses(MonthOfEvent,DayOfEvent);

            EmailTemplate VendorReviewTemplate = [select Id,Name,Subject,body from EmailTemplate where DeveloperName = :VendorReviewEmailTemplateName];
 
            if(VendorReviewTemplate != null && VendorReviewIdsList.isEmpty() == false)
            {

                Messaging.MassEmailMessage VendorReviewMail = new Messaging.MassEmailMessage();
    
                VendorReviewMail.setTargetObjectIds(VendorReviewIdsList);
                VendorReviewMail.setTemplateId(VendorReviewTemplate.Id);
                VendorReviewMail.setUseSignature(false);
                VendorReviewMail.setSaveAsActivity(true);

                try {
                    Messaging.sendEmail(new Messaging.MassEmailMessage[] { VendorReviewMail });
                }catch(Exception e)
                {
                    System.Debug(e);
                }
           
            }
            else
            {
                System.Debug('VendorReviewCronJob:sendMail(): Either an email template could not be found, or no Account has a Vendor Review today');
            }

                
        }

    
}
I've scheduled the apex class to run daily, but although it's showing that it has run, the emails for the reviews due that day haven't sent, and I also haven't received the confirmation email of how many were sent.

Admittedly, I got the base of the code from a mailer that was checking for birthdays on a Contact object, but I felt the same principles still applied.

Can anybody see where I've gone wrong?
I have a Custom (Managed) object called Individual Email Result (et4ae5__IndividualEmailResult__c) which contains a Lookup field to a Contact record (et4ae5__Contact__c) and I want to create a schedulable Apex Class to execute daily and update all of the related Contact records (with specific data from the fields of the Individual Email Result record) when it detects that a particular Individual Email Result checkbox (MC_ANY_Sent__c) equals 'true'.

Here is the code that I have so far: 
public class MCANYSent implements Schedulable, Database.Batchable<sObject>{

    public void execute( SchedulableContext context )
    {
        Database.executeBatch( this );
    }

    public Database.QueryLocator start( Database.BatchableContext context )
    {
        return Database.getQueryLocator
        (   'SELECT Id, MC_ANY_Sent__c, et4ae5__DateSent__c, Name, et4ae5__FromName__c, et4ae5__FromAddress__c, et4ae5__Contact__c'
        +   'FROM et4ae5__IndividualEmailResult__c'
        +   'WHERE MC_ANY_Sent__c = true'
        );
    }

    public void execute( Database.BatchableContext context, List<et4ae5__IndividualEmailResult__c> individualemailresults )
    {
        for ( et4ae5__IndividualEmailResult__c ier : individualemailresults )
        {
            ier.et4ae5__Contact__r.MC_Date_of_Last_ANY_Sent__c = ier.et4ae5__DateSent__c;
            ier.et4ae5__Contact__r.MC_Last_Email_Title__c = ier.Name;
            ier.et4ae5__Contact__r.MC_Last_Email_Sender__c = ier.et4ae5__FromName__c + '(' + ier.et4ae5__FromAddress__c + ')';
        }
        update individualemailresults.et4ae5__Contact__c;
    }

    public void finish( Database.BatchableContext context )
    {
        // nothing to do here
    }
}
However, when I try to save this, I am getting the following error;
Error: Compile Error: Variable does not exist: et4ae5__Contact__c at line 25 column 39

Line 25 is the 'update individualemailresults.et4ae5__Contact__c;' line.

I don't need to update the Individual Email Result record, as it isn't being changed, so I'm only looking to update the Contact record in the Lookup field (et4ae5__Contact__c), which is the default Salesforce Contact object, where all of the changes have been made.

Any ideas? 
I'm trying to create an Apex Class that checks all Account records on a daily basis and sends an email to the email field on ones that have a review due on that date.

For example:
Vendor ABC Pty Ltd has opted in for reviews (Vendor Review: Reminders = true), has an annual review date set in their record (Vendor Review: Date = 17/02/2019), and an email address set in their record (Vendor Review: Email = abc@test.com).

Here is my code:
global class VendorReviewCronJob implements Schedulable{ 
    
        global void execute(SchedulableContext SC) {
            sendmail();
        }

        public List<Id> getVendorReviewEmailAddresses(Integer Month, Integer Day) 
        { 
            List<Id> mailToIds = new List<Id>();
             
            Account[] a = [SELECT Id, Vendor_Review_Email__c, Vendor_Review_Date__c, Vendor_Review_Reminders__c
                            FROM Account 
                            WHERE DAY_IN_MONTH(Vendor_Review_Date__c) = : Day 
                            AND CALENDAR_MONTH(Vendor_Review_Date__c) = : Month   
                            ];
        
            for(Account recipient : a) {
                    
                    System.Debug('\n*******Found VendorReview Recipient');
                                        
                    if (recipient.Vendor_Review_Reminders__c == true)
                    {
                        mailToIds.add(recipient.Id);
                        System.Debug('\n*******Recipient: '+ recipient.Vendor_Review_Email__c);
                         
                    } else {
                        System.Debug('\n*******NO Recipient');
                    }
                
            }

            return mailToIds;
        }




        public void sendMail() 
        {
      
            String debugAddress = 'eyewell@salesforce.com';
            String VendorReviewEmailTemplateName = 'User_Vendor_Review_Required';       
            String debugMessage;
            String[] toAddresses;

            Integer DayOfEvent   = date.today().day();
            Integer MonthOfEvent = date.today().month();

            List<Id> VendorReviewIdsList = getVendorReviewEmailAddresses(MonthOfEvent,DayOfEvent);

            EmailTemplate VendorReviewTemplate = [select Id,Name,Subject,body from EmailTemplate where DeveloperName = :VendorReviewEmailTemplateName];
 
            if(VendorReviewTemplate != null && VendorReviewIdsList.isEmpty() == false)
            {

                Messaging.MassEmailMessage VendorReviewMail = new Messaging.MassEmailMessage();
    
                VendorReviewMail.setTargetObjectIds(VendorReviewIdsList);
                VendorReviewMail.setTemplateId(VendorReviewTemplate.Id);
                VendorReviewMail.setUseSignature(false);
                VendorReviewMail.setSaveAsActivity(true);

                try {
                    Messaging.sendEmail(new Messaging.MassEmailMessage[] { VendorReviewMail });
                }catch(Exception e)
                {
                    System.Debug(e);
                }
           
            }
            else
            {
                System.Debug('VendorReviewCronJob:sendMail(): Either an email template could not be found, or no Account has a Vendor Review today');
            }

                
        }

    
}
I've scheduled the apex class to run daily, but although it's showing that it has run, the emails for the reviews due that day haven't sent, and I also haven't received the confirmation email of how many were sent.

Admittedly, I got the base of the code from a mailer that was checking for birthdays on a Contact object, but I felt the same principles still applied.

Can anybody see where I've gone wrong?
I have created a Triggered Send using Marketing Cloud Connector, but when I click the [ Activate ] button, I'm getting the following error:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client', faultstrnig:'System.NullPointerxception: Attempt to de-reference a null object

(et4ae5)',}

Any ideas?
I have not written an apex class yet so I'm not sure i have the hang of this yet.  I am needing to update two custom account fields to null once a date field has been met.  Im going the route of apex class because i need to add it to the scheduler for the update versus using workflow or process builder.  

Scenario:  When the TSS Temporary End Date = TODAY(), i want to update the TSS Designation field (picklist) to Null and update the TSS Temporary End Date to Null.

public class update_tss_fields {
    public static String saveData(){
        for (Account a : [SELECT Id FROM Account WHERE TSS_Temporary_End_Date__c = TODAY()]){
               if (a.TSS_Temporary_End_Date__c = TODAY()){ 
                   a.TSS_Designation__C = null;
                   a.TSS_Temporary_End_Date__c = null;
                   update a;
               } 
               }    
        }
     }


I've tried 'UPDATE', 'IF' and when i try to save it get an error when using those expressions.  So im now getting this error: Error: Compile Error: Expecting ']' but was: '(' at line 3 column 89) 

Any help would be appreciated.

I did recieve the following updated code from another user in the community but it did not resolve my issue.  I get a new error:  Error: Compile Error: Method does not exist or incorrect signature: void TODAY() from the type update_tss_fields at line 4 column 85

public class update_tss_fields {
    public static String saveData(){
     List<Account> accountsToUpdate = new LIST<Account>();
        for (Account a : [SELECT Id FROM Account WHERE TSS_Temporary_End_Date__c =: TODAY()]){
               if (a.TSS_Temporary_End_Date__c = TODAY()){ 
                   a.TSS_Designation__C = null;
                   a.TSS_Temporary_End_Date__c = null;
                   accountsToUpdate.add(a); // make use of collections to store records
                 
               } 
               }    
update accountsToUpdate; // do the dml outside of for loop
        }
     }

My CTI Connector works great when an incoming call matches a contact or account.  The task is linked to the contact and all is good.  

 

The problem I'm having is when a call does not match, there is no record of the phone number in the task object.  

 

My first attempt to fix this was to set the subject line of the task, which works, but SFDC does not recognize this as a phone number, so there is no 'click-to-dial' option.

 

My second attempt was to try and set the Phone field when I created the object, but that throws an error from when I attempt to reference the "Phone" item.

 

My questions are:

 

1) Is there a best practice here for this?  It would be great to have a click-to-dial option to return the call from somebody not in the system.

 

2) The format of the call subject is initially loaded from a localization context.  I would like to benefit from the localization, but I don't know where I change that format within SFDC.  The fiield is called CallLogTaskSubject.

 

Thank you.

My CTI Connector works great when an incoming call matches a contact or account.  The task is linked to the contact and all is good.  

 

The problem I'm having is when a call does not match, there is no record of the phone number in the task object.  

 

My first attempt to fix this was to set the subject line of the task, which works, but SFDC does not recognize this as a phone number, so there is no 'click-to-dial' option.

 

My second attempt was to try and set the Phone field when I created the object, but that throws an error from when I attempt to reference the "Phone" item.

 

My questions are:

 

1) Is there a best practice here for this?  It would be great to have a click-to-dial option to return the call from somebody not in the system.

 

2) The format of the call subject is initially loaded from a localization context.  I would like to benefit from the localization, but I don't know where I change that format within SFDC.  The fiield is called CallLogTaskSubject.

 

Thank you.