• Ti Saunders 8
  • NEWBIE
  • 55 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 14
    Replies
I am wanting to change the "assigned to" value in open (i.e. not closed) activities whenever the parent record owner changes. Our marketing automation system is automatically creating a bulk of tasks and assigning them to the current contact owner, but a few hours later a mass contact reassignment is happening and these tasks are not getting assigned to the new contact owner.

Desired functionality:
1. Contact Owner changes
2. Related open activities (tasks) are reassigned to new contact owner
-end-

Thanks in advance for your help.
I'm trying to create a workflow rule that will only fire during the weekday work hours (M-F 9am-5pm EST). I'm thinking this can be accomplished using a formula, but am not sure how to go about doing it. Basically I want this rule to fire only when a field called "rating" is set to "A" or "B" AND it is between working hours (M-F 9a-5p). If it is outside of working hours I would like this rule to trigger when it becomes working hours again.

Example would be the "Rating" field become an "A" on Sunday (Or Monday at 5am), so the rule would trigger on Monday at 9am (i.e. when working hours again.

Any help is greatly appreciated.
I'm writing a VisualForce email template and getting this error:
Error: Win_Notes_Tix_VF line 65, column 31: The element type "tr" must be terminated by the matching end-tag "</tr>"
Error: The element type "tr" must be terminated by the matching end-tag "</tr>".
 
<messaging:emailTemplate recipientType="Contact"
    relatedToType="Opportunity"
    subject="Congratulations to {!relatedTo.Owner.Name} for the {!relatedTo.Sale_Type__c} win with {!relatedTo.Account}"
    replyTo="salesforcesupport@rft.com" >
   
<messaging:htmlEmailBody>        
    <html>
        <body>
            <p style="font-size: 16px; font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
                Dear Sales:
                <br/>
                <br/>
                Congratulations to <strong>{!relatedTo.Owner.name}</strong> for the {!relatedTo.Sale_Type__c} win with {!relatedTo.Account} 
                <br/>
                <br/>
                Term: {!relatedTo.Term__c} Months
                <br/>
                <br/>
                Manager: {!relatedTo.Manager__c }
                <br/>
                <br/>
                Connect Ticket Sold: {!relatedTo.Connect_Tickets__c}
                <br/>
                <br/> 
                Was Conference discussed/ positioned: {!relatedTo.Was_Conference_Discussed__c}
                <br/>
                <br/>
                Reason for conference ticket not sold: {!relatedTo.Reason_for_Tickets_Not_Sold__c}
                <br/>
                <br/> 
                Close Date: {!relatedTo.CloseDate}
                <br/>
                <br/> 
               ARR (USD): {!relatedTo.Forecast_Amount__c}
                <br/>
                <br/>
                Total Opportunity Value (TCV): {!relatedTo.Total_Cash_Value_TCV__c}
                <br/>
                <br/>
                Reason for Win: {!relatedTo.Reason_for_Win__c}
                <br/>
                <br/>           
                <strong> Win Notes: </strong>  {!relatedTo.Win_Notes__c}
                <br/>
                <br/>
                <strong>Growth and Cross Sell Opportunities: </strong>{!relatedTo.Growth_and_Cross_Sell__c}
                <br/>
                <br/>
                <strong>Products Sold: </strong>
                <table border="1" cellspacing="0" cellpadding="4" style="font-size: 16px; font-family: Arial, Helvetica, sans-serif;">
                    <tr align="left"> 
                        <th >Product Name</th>
                        <th >SKU</th>
                        <th >Quantity</th>
                        <th >ACV</th>
                    </tr>
                    <apex:repeat var="oli" value="{!relatedTo.OpportunityLineItems}">
                        <tr>
                            <td >{!oli.PriceBookEntry.name}</td>
                            <td >{!oli.Product2}</td>
                            <td align="right" >{!ROUND(oli.Quantity,0)}</td>
                                <apex:outputText value="{0, currency}">
                                      <apex:param value="{!ROUND(oli.ARI__c,0)}" />
                                </apex:outputText>                          
                            </td>                        
                        </tr>
                    </apex:repeat>
                </table>
                <br/>
            </p>
        </body>
    </html>
</messaging:htmlEmailBody> 
</messaging:emailTemplate>

 
I'm trying to create a validation rule that makes fields specific required for certain users based on their roles. If a user's role is: Account Manager, Sales Rep, or International Sales, AND they are marking an opportunity stage (picklist) as "Closed - Won" we want to make a few fields required.

The fields we want to be required if the above is true are: 
ARR 
Total Opportunity Value (TCV)
Reason for Win 
Win Notes
Growth
Products Sold

In addition to the above, we also need the minimum characters for "Win Notes" and "Growth" to be 500 characters.

Any help is greatly appreciated.
Our org has a trigger that will update contact fields to corresponding account fields when changed. We are getting a lot of CPU time limit exceeded emails for some reason.

Here is what we have for the trigger:
AccountAfterUpdate on Account (after update) {
    
    list<Account> accounts = new list<Account>();

    // Loop through Accounts to gather modified fields
    for (Account acct : Trigger.New) {
            
        Account oldAcct = Trigger.oldMap.get(acct.Id);

/*
i_Account_Type
i_PSA/CRM
i_RMM

i_ET_Customer
i_ET_Exp_Date
i_NA_Customer
i_NA_Exp_Date
i_NA_LastRun_Date
i_NA_Purch_Date
i_NA_Report_Count
i_PW_Customer
i_PW_Exp_Date
i_SA_Customer
i_SA_Exp_Date
i_SA_LastRun_Date
i_SA_Purch_Date
i_SA_Report_Count
i_TD_Customer
i_TD_Exp_Date
i_BDR_RunCount_1y__c
i_BDR_RunCount_30d__c
i_BDR_RunCount_90d__c
i_DetectorSDS_NumDeployed__c
i_DetectorSDS_Purch_Date__c
i_EA_RunCount_1y__c
i_EA_RunCount_30d__c
i_EA_RunCount_90d__c
i_HIPAA_RunCount_1y__c
i_HIPAA_RunCount_30d__c
i_HIPAA_RunCount_90d__c
i_NA_RunCount_1y__c
i_NA_RunCount_30d__c
i_NA_RunCount_90d__c
i_PCI_RunCount_1y__c
i_PCI_RunCount_30d__c
i_PCI_RunCount_90d__c
i_Reporter_Units__c
i_SA_RunCount_1y__c
i_SA_RunCount_30d__c
i_SA_RunCount_90d__c
i_SQL_RunCount_1y__c
i_SQL_RunCount_30d__c
i_SQL_RunCount_90d__c

i_Type_of_IT__c

i_ET_Price__c
i_TD_Price__c
i_SA_Price__c
i_PW_Price__c
i_NA_Price__c

i_EA_Customer__c
i_EA_Exp_Date__c
i_EA_LastRun_Date__c
i_EA_Purch_Date__c
i_EA_Report_Count__c
i_EA_Price__c

i_ND_Module_Count__c

i_CC_Exp_Date__c
i_ET_Purch_Date__c
i_Affiliations__c


i_SQL_Customer__c
i_SQL_Exp_Date__c
i_SQL_LastRun_Date__c
i_SQL_Price__c
i_SQL_Purch_Date__c
i_SQL_Report_Count__c

i__CNCT_Customer__c
i__CNCT_Purch_Date__c
i__CNCT_Exp_Date__c
i__CNCT_Price__c

i_HIPAA_Customer__c
i_HIPAA_Exp_Date__c
i_HIPAA_Price__c
i_HIPAA_Purch_Date__c

i_INSPECTOR_Customer__c
i_INSPECTOR_Units__c

Affiliation_ASCII__c
Affiliation_CharTec__c
Affiliation_CompTIA__c
Affiliation_HTG__c
Affiliation_RR__c

Business_Type__c, FMIT_ID__c, i_HIPAA_Report_Count__c, i_HIPAA_LastRun_Date__c,
i_NDS_HC_Customer__c, i_NDS_HC_Exp_Date__c, i_NDS_HC_Purch_Date__c, i_NDS_HC_Price__c, i_NDS_HC_Report_Count__c, i_NDS_HC_LastRun_Date__c

i_PCI_Customer__c, i_PCI_Exp_Date__c, i_PCI_LastRun_Date__c, i_PCI_Price__c, i_PCI_Purch_Date__c, i_PCI_Report_Count__c,
i_MSA_Customer__c, i_MSA_Exp_Date__c, i_MSA_LastRun_Date__c, i_MSA_Price__c, i_MSA_Purch_Date__c, i_MSA_Report_Count__c

i_DETECTOR_Customer__c, i_DETECTOR_Units__c, i_REPORTER_Customer__c, i_REPORTER_Units__c, Sales_Rep__c, i_OEM_Continuum__c

i_BDR_Customer_c__c, i_BDR_Exp_Date_c__c, i_BDR_LastRun_Date_c__c, i_BDR_Price_c__c, i_BDR_Purch_Date_c__c, i_BDR_Report_Count_c__c

i_DetectorSDS_Customer__c, i_DetectorSDS_Exp_Date__c, i_DetectorSDS_LastActivation_Date__c, i_DetectorSDS_NumDeployed__c, i_DetectorSDS_Price__c, i_DetectorSDS_Purch_Date__c

*/

        if (acct.i_Account_Type__c != oldAcct.i_Account_Type__c || acct.i_PSA_CRM__c != oldAcct.i_PSA_CRM__c ||
            acct.i_RMM__c != oldAcct.i_RMM__c || acct.i_ET_Customer__c != oldAcct.i_ET_Customer__c ||
            acct.i_ET_Exp_Date__c != oldAcct.i_ET_Exp_Date__c || acct.i_NA_Customer__c != oldAcct.i_NA_Customer__c || 
            acct.i_NA_Exp_Date__c != oldAcct.i_NA_Exp_Date__c || acct.i_NA_LastRun_Date__c != oldAcct.i_NA_LastRun_Date__c || 
            acct.i_NA_Purch_Date__c != oldAcct.i_NA_Purch_Date__c || acct.i_NA_Report_Count__c != oldAcct.i_NA_Report_Count__c || 
            acct.i_PW_Customer__c != oldAcct.i_PW_Customer__c || acct.i_PW_Exp_Date__c != oldAcct.i_PW_Exp_Date__c || 
            acct.i_SA_Customer__c != oldAcct.i_SA_Customer__c || acct.i_SA_Exp_Date__c != oldAcct.i_SA_Exp_Date__c || 
            acct.i_SA_LastRun_Date__c != oldAcct.i_SA_LastRun_Date__c || acct.i_SA_Purch_Date__c != oldAcct.i_SA_Purch_Date__c || 
            acct.i_SA_Report_Count__c != oldAcct.i_SA_Report_Count__c ||  
            acct.i_Type_of_IT__c != oldAcct.i_Type_of_IT__c || acct.i_ET_Price__c != oldAcct.i_ET_Price__c ||
            acct.i_SA_Price__c != oldAcct.i_SA_Price__c || 
            acct.i_PW_Price__c != oldAcct.i_PW_Price__c || acct.i_NA_Price__c != oldAcct.i_NA_Price__c || 
            acct.i_EA_Customer__c != oldAcct.i_EA_Customer__c || acct.i_EA_Exp_Date__c != oldAcct.i_EA_Exp_Date__c ||
            acct.i_EA_LastRun_Date__c != oldAcct.i_EA_LastRun_Date__c || acct.i_EA_Purch_Date__c != oldAcct.i_EA_Purch_Date__c ||
            acct.i_EA_Report_Count__c != oldAcct.i_EA_Report_Count__c || acct.i_EA_Price__c != oldAcct.i_EA_Price__c ||
            acct.i_ND_Module_Count__c != oldAcct.i_ND_Module_Count__c || acct.i_CC_Exp_Date__c != oldAcct.i_CC_Exp_Date__c ||
            acct.i_ET_Purch_Date__c != oldAcct.i_ET_Purch_Date__c || acct.i_Affiliations__c != oldAcct.i_Affiliations__c || 
            acct.i_Refresh__c != oldAcct.i_Refresh__c || 
            acct.i_SQL_Customer__c != oldAcct.i_SQL_Customer__c || acct.i_SQL_Exp_Date__c != oldAcct.i_SQL_Exp_Date__c ||
            acct.i_SQL_LastRun_Date__c != oldAcct.i_SQL_LastRun_Date__c || acct.i_SQL_Price__c != oldAcct.i_SQL_Price__c ||
            acct.i_SQL_Purch_Date__c != oldAcct.i_SQL_Purch_Date__c || acct.i_SQL_Report_Count__c != oldAcct.i_SQL_Report_Count__c ||
            acct.i_CNCT_Customer__c != oldAcct.i_CNCT_Customer__c || acct.i_CNCT_Purch_Date__c != oldAcct.i_CNCT_Purch_Date__c ||
            acct.i_CNCT_Exp_Date__c != oldAcct.i_CNCT_Exp_Date__c || acct.i_CNCT_Price__c != oldAcct.i_CNCT_Price__c ||
            acct.i_HIPAA_Customer__c != oldAcct.i_HIPAA_Customer__c || acct.i_HIPAA_Exp_Date__c != oldAcct.i_HIPAA_Exp_Date__c ||
            acct.i_HIPAA_Price__c != oldAcct.i_HIPAA_Price__c || acct.i_HIPAA_Purch_Date__c != oldAcct.i_HIPAA_Purch_Date__c ||
            acct.i_INSPECTOR_Customer__c != oldAcct.i_INSPECTOR_Customer__c || acct.i_INSPECTOR_Units__c != oldAcct.i_INSPECTOR_Units__c ||
            acct.Affiliation_ASCII__c != oldAcct.Affiliation_ASCII__c || acct.Affiliation_CharTec__c != oldAcct.Affiliation_CharTec__c ||
            acct.Affiliation_CompTIA__c != oldAcct.Affiliation_CompTIA__c || acct.Affiliation_HTG__c != oldAcct.Affiliation_HTG__c ||
            acct.Affiliation_RR__c != oldAcct.Affiliation_RR__c ||
            acct.Business_Type__c != oldAcct.Business_Type__c || acct.FMIT_ID__c != oldAcct.FMIT_ID__c || acct.i_HIPAA_Report_Count__c != oldAcct.i_HIPAA_Report_Count__c || 
            acct.i_HIPAA_LastRun_Date__c != oldAcct.i_HIPAA_LastRun_Date__c || 
            acct.i_PCI_Customer__c != oldAcct.i_PCI_Customer__c || acct.i_PCI_Exp_Date__c != oldAcct.i_PCI_Exp_Date__c || acct.i_PCI_LastRun_Date__c != oldAcct.i_PCI_LastRun_Date__c || 
            acct.i_PCI_Price__c != oldAcct.i_PCI_Price__c || acct.i_PCI_Purch_Date__c != oldAcct.i_PCI_Purch_Date__c || acct.i_PCI_Report_Count__c != oldAcct.i_PCI_Report_Count__c ||
            acct.i_DETECTOR_Customer__c != oldAcct.i_DETECTOR_Customer__c || acct.i_DETECTOR_Units__c != oldAcct.i_DETECTOR_Units__c || 
            acct.i_REPORTER_Customer__c != oldAcct.i_REPORTER_Customer__c || acct.i_REPORTER_Units__c != oldAcct.i_REPORTER_Units__c || acct.Sales_Rep__c != oldAcct.Sales_Rep__c ||
            acct.i_OEM_Continuum__c != oldAcct.i_OEM_Continuum__c ||
            acct.i_BDR_Customer_c__c != oldAcct.i_BDR_Customer_c__c || acct.i_BDR_Exp_Date_c__c != oldAcct.i_BDR_Exp_Date_c__c || 
            acct.i_BDR_LastRun_Date_c__c != oldAcct.i_BDR_LastRun_Date_c__c || acct.i_BDR_Price_c__c != oldAcct.i_BDR_Price_c__c || 
            acct.i_BDR_Purch_Date_c__c != oldAcct.i_BDR_Purch_Date_c__c || acct.i_BDR_Report_Count_c__c != oldAcct.i_BDR_Report_Count_c__c ||
            acct.i_DetectorSDS_Customer__c != oldAcct.i_DetectorSDS_Customer__c || 
            acct.i_DetectorSDS_Exp_Date__c != oldAcct.i_DetectorSDS_Exp_Date__c || 
            acct.i_DetectorSDS_LastActivation_Date__c != oldAcct.i_DetectorSDS_LastActivation_Date__c || 
            acct.i_DetectorSDS_NumDeployed__c != oldAcct.i_DetectorSDS_NumDeployed__c || 
            acct.i_DetectorSDS_Price__c != oldAcct.i_DetectorSDS_Price__c ||
            acct.i_DetectorSDS_Purch_Date__c != oldAcct.i_DetectorSDS_Purch_Date__c ||
            acct.i_CyberHawk_ABDS_Sites__c != oldacct.i_CyberHawk_ABDS_Sites__c ||
            acct.i_CyberHawk_BDS_Sites__c != oldacct.i_CyberHawk_BDS_Sites__c ||
            acct.i_BDR_RunCount_1y__c != oldacct.i_BDR_RunCount_1y__c ||
            acct.i_BDR_RunCount_30d__c != oldacct.i_BDR_RunCount_30d__c ||
            acct.i_BDR_RunCount_90d__c != oldacct.i_BDR_RunCount_90d__c ||
            acct.i_EA_RunCount_1y__c != oldacct.i_EA_RunCount_1y__c ||
            acct.i_EA_RunCount_30d__c != oldacct.i_EA_RunCount_30d__c ||
            acct.i_EA_RunCount_90d__c != oldacct.i_EA_RunCount_90d__c ||
            acct.i_HIPAA_RunCount_1y__c != oldacct.i_HIPAA_RunCount_1y__c ||
            acct.i_HIPAA_RunCount_30d__c != oldacct.i_HIPAA_RunCount_30d__c ||
            acct.i_HIPAA_RunCount_90d__c != oldacct.i_HIPAA_RunCount_90d__c  ||
            acct.i_NA_RunCount_1y__c != oldacct.i_NA_RunCount_1y__c ||
            acct.i_NA_RunCount_30d__c != oldacct.i_NA_RunCount_30d__c ||
            acct.i_NA_RunCount_90d__c != oldacct.i_NA_RunCount_90d__c ||
            acct.i_PCI_RunCount_1y__c != oldacct.i_PCI_RunCount_1y__c ||
            acct.i_PCI_RunCount_30d__c != oldacct.i_PCI_RunCount_30d__c ||
            acct.i_PCI_RunCount_90d__c != oldacct.i_PCI_RunCount_90d__c ||
            acct.i_SA_RunCount_1y__c != oldacct.i_SA_RunCount_1y__c ||
            acct.i_SA_RunCount_30d__c != oldacct.i_SA_RunCount_30d__c ||
            acct.i_SA_RunCount_90d__c != oldacct.i_SA_RunCount_90d__c ||
            acct.i_SQL_RunCount_1y__c != oldacct.i_SQL_RunCount_1y__c ||
            acct.i_SQL_RunCount_30d__c != oldacct.i_SQL_RunCount_30d__c ||
            acct.i_SQL_RunCount_90d__c != oldacct.i_SQL_RunCount_90d__c ||
            acct.i_Reporter_Purch_Date__c != oldacct.i_Reporter_Purch_Date__c ||
            acct.i_Reporter_Exp_Date__c != oldacct.i_Reporter_Exp_Date__c ||
            acct.i_AGP_GDPR_Units__c != oldacct.i_AGP_GDPR_Units__c ||
            acct.i_AGP_Program__c  != oldacct.i_AGP_Program__c ||
            acct.i_AGP_Purch_Date__c != oldacct.i_AGP_Purch_Date__c ||
            acct.i_AG_GDPR_Exp_Date__c != oldacct.i_AG_GDPR_Exp_Date__c ||
            acct.i_AG_GDPR_Price__c != oldacct.i_AG_GDPR_Price__c ||
            acct.i_AG_HIPAA_Customer__c != oldacct.i_AG_HIPAA_Customer__c ||
            acct.i_AG_HIPAA_Exp_Date__c != oldacct.i_AG_HIPAA_Exp_Date__c ||
            acct.i_AG_HIPAA_Price__c != oldacct.i_AG_HIPAA_Price__c ||
            acct.i_AG_HIPAA_Purch_Date__c != oldacct.i_AG_HIPAA_Purch_Date__c ||
            acct.i_AG_HIPAA_Units__c != oldacct.i_AG_HIPAA_Units__c ||
            acct.ob_Cyber_Hawk__c    != oldacct.ob_Cyber_Hawk__c  ||      
            acct.ob_Cyber_Hawk_Date__c    != oldacct.ob_Cyber_Hawk_Date__c   ||      
            acct.ob_Exchange__c    != oldacct.ob_Exchange__c      ||
            acct.ob_Exchange_Date__c    != oldacct.ob_Exchange_Date__c      ||
            acct.ob_GDPR__c    != oldacct.ob_GDPR__c      ||
            acct.ob_GDPR_Date__c    != oldacct.ob_GDPR_Date__c      ||
            acct.ob_HIPAA__c    != oldacct.ob_HIPAA__c      ||
            acct.ob_HIPAA_Date__c    != oldacct.ob_HIPAA_Date__c  ||       
            acct.ob_Inspector__c    != oldacct.ob_Inspector__c    ||
            acct.ob_Inspector_Date__c    != oldacct.ob_Inspector_Date__c ||
            acct.ob_NAM_SAM__c    != oldacct.ob_NAM_SAM__c ||       
            acct.ob_NAM_SAM_Date__c    != oldacct.ob_NAM_SAM_Date__c ||      
            acct.ob_PCI__c    != oldacct.ob_PCI__c ||       
            acct.ob_PCI_Date__c    != oldacct.ob_PCI_Date__c ||      
            acct.ob_Reporter__c    != oldacct.ob_Reporter__c ||      
            acct.ob_Reporter_Date__c    != oldacct.ob_Reporter_Date__c ||    
            acct.ob_SQL__c    != oldacct.ob_SQL__c ||
            acct.ob_SQL_Date__c    != oldacct.ob_SQL_Date__c  ||
            acct.Lead_Status__c != oldacct.Lead_Status__c   ||
            acct.Lead_Status_Reason__c != oldacct.Lead_Status_Reason__c ||
            acct.Already_Being_Worked__c != oldacct.Already_Being_Worked__c ||
            acct.i_DWID_Customer__c != oldacct.i_DWID_Customer__c ||
            acct.i_DWID_Exp_Date__c != oldacct.i_DWID_Exp_Date__c ||
            acct.i_DWID_Level__c != oldacct.i_DWID_Level__c ||
            acct.i_DWID_Price__c != oldacct.i_DWID_Price__c ||
            acct.i_DWID_Purch_Date__c != oldacct.i_DWID_Purch_Date__c ||
            acct.i_AG_CI_Customer__c != oldacct.i_AG_CI_Customer__c ||
            acct.i_AG_CI_Exp_Date__c != oldacct.i_AG_CI_Exp_Date__c ||
            acct.i_AG_CI_Price__c != oldacct.i_AG_CI_Price__c ||
            acct.i_AG_CI_Purch_Date__c != oldacct.i_AG_CI_Purch_Date__c ||
            acct.i_AG_CI_Units__c != oldacct.i_AG_CI_Units__c 
            ) {

                accounts.add(acct);
        }
    }

    ProactiveWatchHelper.UpdateContactDetails(accounts);

 
I am writing a workflow rule for the Contact object that will update contact fields based on changes to the Account. 

When the "Lead Rating" (picklist) field equals "A+" and the "Lead Score" (number) field equals "51", I want the rule to trigger. This is what I am using: 

AND(
 ispickval(Account.Lead_Rating__c,"A+"),
 (Account.Lead_Score__c =51))

I am not getting any syntax errors, but the rule is not triggering.
We have a field called Lead_Rating which is a picklist with options: A+, A, B, C, or D. I am trying to write a workflow rule that will trigger when the Lead_Rating field is changed FROM D or C, to A+, A, or B.

In addition to the above, the rule should only trigger if another field called "Lead_Status" (also a picklist) is equal to one of these 3 values: New, Returning, or Qualified. 

I'm trying the below formula, but am getting: 
Error: Function PRIORVALUE may not be used in this type of formula

AND( 
OR(text(PRIORVALUE( Lead_Status__c )='D'), text(PRIORVALUE(Lead_Status__c )='C')) 
,OR(Lead_Status__c='A', Lead_Status__c='A+', Lead_Status__c='B'))
Hello,

I am trying to create a formula for a workflow rule that will cause it to trigger only when a field changes from a certain value.

Specifically:

I want a field named "Lead_Status" (picklist) to be set to the value "Returning", when an account owner is changed FROM one of our internal admin accounts (i.e. user 1, user 2, or user 3.) to a sales rep (i.e. user 3, user 4, or user 5) AND another field named "ABW" is NOT checked (i.e. boolean = false).
I'm trying to get a custom activity button to work that will toggle a checkbox field on the contact. It works fine when the field is visible, but fails when I hide the field (needs to be hidden). 

Error I'm getting is:

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

Unexpected token =="
 
{!REQUIRESCRIPT("/soap/ajax/41.0/connection.js")} 

if({!Contact.Onboarding_Survey_Trigger__c} == false) 
{ 
var c = new sforce.SObject("Contact"); 
c.id = "{!Contact.Id}"; 
c.Onboarding_Survey_Trigger__c = true; 
result = sforce.connection.update([c]); 
if ( result[0].getBoolean( "Email Scheduled!" ) ) 
{ 
window.location.reload(); 
} 
else 
{ 
alert( "failed"); 
} 
} 
else 
{ 
var c = new sforce.SObject("Contact"); 
c.id = "{!Contact.Id}"; 
c.Onboarding_Survey_Trigger__c = false; 
result = sforce.connection.update([c]); 
if ( result[0].getBoolean( "Email Scheduled!" ) ) 
{ 
window.location.reload(); 
} 
else 
{ 
alert( "failed"); 
} 
}

 
I'm trying to create a button that will toggle a checkbox (i.e. if checked then uncheck, if unchecked then check). This checkbox will trigger a workflow rule that will send an email to the contact 24 hours later.

I realize that these buttons may become obsolete in Lightning, but my org does not wish to switch in the forseeable future (not my decision).

Any help is much appreaciated!
I created a new process to update an account field (call_stage__c) whenever a new task is created. Basically, it just changes the picklist value to increase to the next call (e.g. call1 to call2, call2 to call3, etc.). This is working just fine when creating tasks for Accounts, but I keep getting this error when creating tasks in Leads. 

I noticed that this only happens when I use a type formula in the process and doesn't seem to happen when type=formula. I have a separate process that works pretty much the same, but I'm using type=picklist (this is under "immediate actions"). The formula I'm using is:

IF(text([Task].Account.Call_Stage__c)= "call1", "call2",
IF(text([Task].Account.Call_Stage__c)= "call2", "call3",
IF(text([Task].Account.Call_Stage__c)= "call3", "call4",
IF(text([Task].Account.Call_Stage__c)= "call4", "call5",
IF(text([Task].Account.Call_Stage__c)= "call5", "call6",
IF(text([Task].Account.Call_Stage__c)= "call6", "call7",
IF(text([Task].Account.Call_Stage__c)= "call7", "call8",
IF(text([Task].Account.Call_Stage__c)= "call8", "call9",
IF(text([Task].Account.Call_Stage__c)= "call9", "call10",
IF(text([Task].Account.Call_Stage__c)= "call10", "call11",
IF(text([Task].Account.Call_Stage__c)= "call11", "call12",
IF(text([Task].Account.Call_Stage__c)= "call12", "call13",
IF(text([Task].Account.Call_Stage__c)= "call13", "call14",
IF(text([Task].Account.Call_Stage__c)= "call14", "call15",
IF(text([Task].Account.Call_Stage__c)= "call15", "call16",
IF(text([Task].Account.Call_Stage__c)= "call16", "call17",
IF(text([Task].Account.Call_Stage__c)= "call17", "call18",
IF(text([Task].Account.Call_Stage__c)= "call18", "call19",
IF(text([Task].Account.Call_Stage__c)= "call19", "call20",null)))))))))))))))))))

I'm getting "The flow failed to access the value for myVariable_current.Account.Call_Stage__c because it hasn't been set or assigned." whenever my process runs ONLY FOR LEADS.

​Any help is much appreciated!
I want for a field to update within a record (Account) after a certain period of time.

We have a "sales" field that I needed updated after 60 days. There are Account Managers and Sales Reps for each territory and after 60 days, the account is tranferred from the Sales Rep the appropriate Account Manager. Since the appropriate Account Manager would be classified by the Sales Rep, how would I create a trigger to have the "sales" field updated appropriately? 

It would need to know which Account Manager to switch to based on which Sales Rep is originally listed in the field.

Any help would be much appreciated.
Hello,

The way my organization is setup, accounts need to transfer from one sales rep to another after 60 days of existence. Is there a way to automatically change the "sales rep" field we have on the the account after 60 days, or do we have to do that manually every time?

Thanks in advance!
Hello,

I am trying to add a "records per page button" to salesforce in roder to be able to choose how many records per page to display for any given list.Similar to here: https://www.zoho.com/support/help/images/Recordcount.png

Is there a way to enable/disable this feature, or is this something that needs to be added. At my old company we had this option, but it isn't in my new interface.

Thanks in advance.
I'm trying to create a button that will toggle a checkbox (i.e. if checked then uncheck, if unchecked then check). This checkbox will trigger a workflow rule that will send an email to the contact 24 hours later.

I realize that these buttons may become obsolete in Lightning, but my org does not wish to switch in the forseeable future (not my decision).

Any help is much appreaciated!
I am wanting to change the "assigned to" value in open (i.e. not closed) activities whenever the parent record owner changes. Our marketing automation system is automatically creating a bulk of tasks and assigning them to the current contact owner, but a few hours later a mass contact reassignment is happening and these tasks are not getting assigned to the new contact owner.

Desired functionality:
1. Contact Owner changes
2. Related open activities (tasks) are reassigned to new contact owner
-end-

Thanks in advance for your help.
Our org has a trigger that will update contact fields to corresponding account fields when changed. We are getting a lot of CPU time limit exceeded emails for some reason.

Here is what we have for the trigger:
AccountAfterUpdate on Account (after update) {
    
    list<Account> accounts = new list<Account>();

    // Loop through Accounts to gather modified fields
    for (Account acct : Trigger.New) {
            
        Account oldAcct = Trigger.oldMap.get(acct.Id);

/*
i_Account_Type
i_PSA/CRM
i_RMM

i_ET_Customer
i_ET_Exp_Date
i_NA_Customer
i_NA_Exp_Date
i_NA_LastRun_Date
i_NA_Purch_Date
i_NA_Report_Count
i_PW_Customer
i_PW_Exp_Date
i_SA_Customer
i_SA_Exp_Date
i_SA_LastRun_Date
i_SA_Purch_Date
i_SA_Report_Count
i_TD_Customer
i_TD_Exp_Date
i_BDR_RunCount_1y__c
i_BDR_RunCount_30d__c
i_BDR_RunCount_90d__c
i_DetectorSDS_NumDeployed__c
i_DetectorSDS_Purch_Date__c
i_EA_RunCount_1y__c
i_EA_RunCount_30d__c
i_EA_RunCount_90d__c
i_HIPAA_RunCount_1y__c
i_HIPAA_RunCount_30d__c
i_HIPAA_RunCount_90d__c
i_NA_RunCount_1y__c
i_NA_RunCount_30d__c
i_NA_RunCount_90d__c
i_PCI_RunCount_1y__c
i_PCI_RunCount_30d__c
i_PCI_RunCount_90d__c
i_Reporter_Units__c
i_SA_RunCount_1y__c
i_SA_RunCount_30d__c
i_SA_RunCount_90d__c
i_SQL_RunCount_1y__c
i_SQL_RunCount_30d__c
i_SQL_RunCount_90d__c

i_Type_of_IT__c

i_ET_Price__c
i_TD_Price__c
i_SA_Price__c
i_PW_Price__c
i_NA_Price__c

i_EA_Customer__c
i_EA_Exp_Date__c
i_EA_LastRun_Date__c
i_EA_Purch_Date__c
i_EA_Report_Count__c
i_EA_Price__c

i_ND_Module_Count__c

i_CC_Exp_Date__c
i_ET_Purch_Date__c
i_Affiliations__c


i_SQL_Customer__c
i_SQL_Exp_Date__c
i_SQL_LastRun_Date__c
i_SQL_Price__c
i_SQL_Purch_Date__c
i_SQL_Report_Count__c

i__CNCT_Customer__c
i__CNCT_Purch_Date__c
i__CNCT_Exp_Date__c
i__CNCT_Price__c

i_HIPAA_Customer__c
i_HIPAA_Exp_Date__c
i_HIPAA_Price__c
i_HIPAA_Purch_Date__c

i_INSPECTOR_Customer__c
i_INSPECTOR_Units__c

Affiliation_ASCII__c
Affiliation_CharTec__c
Affiliation_CompTIA__c
Affiliation_HTG__c
Affiliation_RR__c

Business_Type__c, FMIT_ID__c, i_HIPAA_Report_Count__c, i_HIPAA_LastRun_Date__c,
i_NDS_HC_Customer__c, i_NDS_HC_Exp_Date__c, i_NDS_HC_Purch_Date__c, i_NDS_HC_Price__c, i_NDS_HC_Report_Count__c, i_NDS_HC_LastRun_Date__c

i_PCI_Customer__c, i_PCI_Exp_Date__c, i_PCI_LastRun_Date__c, i_PCI_Price__c, i_PCI_Purch_Date__c, i_PCI_Report_Count__c,
i_MSA_Customer__c, i_MSA_Exp_Date__c, i_MSA_LastRun_Date__c, i_MSA_Price__c, i_MSA_Purch_Date__c, i_MSA_Report_Count__c

i_DETECTOR_Customer__c, i_DETECTOR_Units__c, i_REPORTER_Customer__c, i_REPORTER_Units__c, Sales_Rep__c, i_OEM_Continuum__c

i_BDR_Customer_c__c, i_BDR_Exp_Date_c__c, i_BDR_LastRun_Date_c__c, i_BDR_Price_c__c, i_BDR_Purch_Date_c__c, i_BDR_Report_Count_c__c

i_DetectorSDS_Customer__c, i_DetectorSDS_Exp_Date__c, i_DetectorSDS_LastActivation_Date__c, i_DetectorSDS_NumDeployed__c, i_DetectorSDS_Price__c, i_DetectorSDS_Purch_Date__c

*/

        if (acct.i_Account_Type__c != oldAcct.i_Account_Type__c || acct.i_PSA_CRM__c != oldAcct.i_PSA_CRM__c ||
            acct.i_RMM__c != oldAcct.i_RMM__c || acct.i_ET_Customer__c != oldAcct.i_ET_Customer__c ||
            acct.i_ET_Exp_Date__c != oldAcct.i_ET_Exp_Date__c || acct.i_NA_Customer__c != oldAcct.i_NA_Customer__c || 
            acct.i_NA_Exp_Date__c != oldAcct.i_NA_Exp_Date__c || acct.i_NA_LastRun_Date__c != oldAcct.i_NA_LastRun_Date__c || 
            acct.i_NA_Purch_Date__c != oldAcct.i_NA_Purch_Date__c || acct.i_NA_Report_Count__c != oldAcct.i_NA_Report_Count__c || 
            acct.i_PW_Customer__c != oldAcct.i_PW_Customer__c || acct.i_PW_Exp_Date__c != oldAcct.i_PW_Exp_Date__c || 
            acct.i_SA_Customer__c != oldAcct.i_SA_Customer__c || acct.i_SA_Exp_Date__c != oldAcct.i_SA_Exp_Date__c || 
            acct.i_SA_LastRun_Date__c != oldAcct.i_SA_LastRun_Date__c || acct.i_SA_Purch_Date__c != oldAcct.i_SA_Purch_Date__c || 
            acct.i_SA_Report_Count__c != oldAcct.i_SA_Report_Count__c ||  
            acct.i_Type_of_IT__c != oldAcct.i_Type_of_IT__c || acct.i_ET_Price__c != oldAcct.i_ET_Price__c ||
            acct.i_SA_Price__c != oldAcct.i_SA_Price__c || 
            acct.i_PW_Price__c != oldAcct.i_PW_Price__c || acct.i_NA_Price__c != oldAcct.i_NA_Price__c || 
            acct.i_EA_Customer__c != oldAcct.i_EA_Customer__c || acct.i_EA_Exp_Date__c != oldAcct.i_EA_Exp_Date__c ||
            acct.i_EA_LastRun_Date__c != oldAcct.i_EA_LastRun_Date__c || acct.i_EA_Purch_Date__c != oldAcct.i_EA_Purch_Date__c ||
            acct.i_EA_Report_Count__c != oldAcct.i_EA_Report_Count__c || acct.i_EA_Price__c != oldAcct.i_EA_Price__c ||
            acct.i_ND_Module_Count__c != oldAcct.i_ND_Module_Count__c || acct.i_CC_Exp_Date__c != oldAcct.i_CC_Exp_Date__c ||
            acct.i_ET_Purch_Date__c != oldAcct.i_ET_Purch_Date__c || acct.i_Affiliations__c != oldAcct.i_Affiliations__c || 
            acct.i_Refresh__c != oldAcct.i_Refresh__c || 
            acct.i_SQL_Customer__c != oldAcct.i_SQL_Customer__c || acct.i_SQL_Exp_Date__c != oldAcct.i_SQL_Exp_Date__c ||
            acct.i_SQL_LastRun_Date__c != oldAcct.i_SQL_LastRun_Date__c || acct.i_SQL_Price__c != oldAcct.i_SQL_Price__c ||
            acct.i_SQL_Purch_Date__c != oldAcct.i_SQL_Purch_Date__c || acct.i_SQL_Report_Count__c != oldAcct.i_SQL_Report_Count__c ||
            acct.i_CNCT_Customer__c != oldAcct.i_CNCT_Customer__c || acct.i_CNCT_Purch_Date__c != oldAcct.i_CNCT_Purch_Date__c ||
            acct.i_CNCT_Exp_Date__c != oldAcct.i_CNCT_Exp_Date__c || acct.i_CNCT_Price__c != oldAcct.i_CNCT_Price__c ||
            acct.i_HIPAA_Customer__c != oldAcct.i_HIPAA_Customer__c || acct.i_HIPAA_Exp_Date__c != oldAcct.i_HIPAA_Exp_Date__c ||
            acct.i_HIPAA_Price__c != oldAcct.i_HIPAA_Price__c || acct.i_HIPAA_Purch_Date__c != oldAcct.i_HIPAA_Purch_Date__c ||
            acct.i_INSPECTOR_Customer__c != oldAcct.i_INSPECTOR_Customer__c || acct.i_INSPECTOR_Units__c != oldAcct.i_INSPECTOR_Units__c ||
            acct.Affiliation_ASCII__c != oldAcct.Affiliation_ASCII__c || acct.Affiliation_CharTec__c != oldAcct.Affiliation_CharTec__c ||
            acct.Affiliation_CompTIA__c != oldAcct.Affiliation_CompTIA__c || acct.Affiliation_HTG__c != oldAcct.Affiliation_HTG__c ||
            acct.Affiliation_RR__c != oldAcct.Affiliation_RR__c ||
            acct.Business_Type__c != oldAcct.Business_Type__c || acct.FMIT_ID__c != oldAcct.FMIT_ID__c || acct.i_HIPAA_Report_Count__c != oldAcct.i_HIPAA_Report_Count__c || 
            acct.i_HIPAA_LastRun_Date__c != oldAcct.i_HIPAA_LastRun_Date__c || 
            acct.i_PCI_Customer__c != oldAcct.i_PCI_Customer__c || acct.i_PCI_Exp_Date__c != oldAcct.i_PCI_Exp_Date__c || acct.i_PCI_LastRun_Date__c != oldAcct.i_PCI_LastRun_Date__c || 
            acct.i_PCI_Price__c != oldAcct.i_PCI_Price__c || acct.i_PCI_Purch_Date__c != oldAcct.i_PCI_Purch_Date__c || acct.i_PCI_Report_Count__c != oldAcct.i_PCI_Report_Count__c ||
            acct.i_DETECTOR_Customer__c != oldAcct.i_DETECTOR_Customer__c || acct.i_DETECTOR_Units__c != oldAcct.i_DETECTOR_Units__c || 
            acct.i_REPORTER_Customer__c != oldAcct.i_REPORTER_Customer__c || acct.i_REPORTER_Units__c != oldAcct.i_REPORTER_Units__c || acct.Sales_Rep__c != oldAcct.Sales_Rep__c ||
            acct.i_OEM_Continuum__c != oldAcct.i_OEM_Continuum__c ||
            acct.i_BDR_Customer_c__c != oldAcct.i_BDR_Customer_c__c || acct.i_BDR_Exp_Date_c__c != oldAcct.i_BDR_Exp_Date_c__c || 
            acct.i_BDR_LastRun_Date_c__c != oldAcct.i_BDR_LastRun_Date_c__c || acct.i_BDR_Price_c__c != oldAcct.i_BDR_Price_c__c || 
            acct.i_BDR_Purch_Date_c__c != oldAcct.i_BDR_Purch_Date_c__c || acct.i_BDR_Report_Count_c__c != oldAcct.i_BDR_Report_Count_c__c ||
            acct.i_DetectorSDS_Customer__c != oldAcct.i_DetectorSDS_Customer__c || 
            acct.i_DetectorSDS_Exp_Date__c != oldAcct.i_DetectorSDS_Exp_Date__c || 
            acct.i_DetectorSDS_LastActivation_Date__c != oldAcct.i_DetectorSDS_LastActivation_Date__c || 
            acct.i_DetectorSDS_NumDeployed__c != oldAcct.i_DetectorSDS_NumDeployed__c || 
            acct.i_DetectorSDS_Price__c != oldAcct.i_DetectorSDS_Price__c ||
            acct.i_DetectorSDS_Purch_Date__c != oldAcct.i_DetectorSDS_Purch_Date__c ||
            acct.i_CyberHawk_ABDS_Sites__c != oldacct.i_CyberHawk_ABDS_Sites__c ||
            acct.i_CyberHawk_BDS_Sites__c != oldacct.i_CyberHawk_BDS_Sites__c ||
            acct.i_BDR_RunCount_1y__c != oldacct.i_BDR_RunCount_1y__c ||
            acct.i_BDR_RunCount_30d__c != oldacct.i_BDR_RunCount_30d__c ||
            acct.i_BDR_RunCount_90d__c != oldacct.i_BDR_RunCount_90d__c ||
            acct.i_EA_RunCount_1y__c != oldacct.i_EA_RunCount_1y__c ||
            acct.i_EA_RunCount_30d__c != oldacct.i_EA_RunCount_30d__c ||
            acct.i_EA_RunCount_90d__c != oldacct.i_EA_RunCount_90d__c ||
            acct.i_HIPAA_RunCount_1y__c != oldacct.i_HIPAA_RunCount_1y__c ||
            acct.i_HIPAA_RunCount_30d__c != oldacct.i_HIPAA_RunCount_30d__c ||
            acct.i_HIPAA_RunCount_90d__c != oldacct.i_HIPAA_RunCount_90d__c  ||
            acct.i_NA_RunCount_1y__c != oldacct.i_NA_RunCount_1y__c ||
            acct.i_NA_RunCount_30d__c != oldacct.i_NA_RunCount_30d__c ||
            acct.i_NA_RunCount_90d__c != oldacct.i_NA_RunCount_90d__c ||
            acct.i_PCI_RunCount_1y__c != oldacct.i_PCI_RunCount_1y__c ||
            acct.i_PCI_RunCount_30d__c != oldacct.i_PCI_RunCount_30d__c ||
            acct.i_PCI_RunCount_90d__c != oldacct.i_PCI_RunCount_90d__c ||
            acct.i_SA_RunCount_1y__c != oldacct.i_SA_RunCount_1y__c ||
            acct.i_SA_RunCount_30d__c != oldacct.i_SA_RunCount_30d__c ||
            acct.i_SA_RunCount_90d__c != oldacct.i_SA_RunCount_90d__c ||
            acct.i_SQL_RunCount_1y__c != oldacct.i_SQL_RunCount_1y__c ||
            acct.i_SQL_RunCount_30d__c != oldacct.i_SQL_RunCount_30d__c ||
            acct.i_SQL_RunCount_90d__c != oldacct.i_SQL_RunCount_90d__c ||
            acct.i_Reporter_Purch_Date__c != oldacct.i_Reporter_Purch_Date__c ||
            acct.i_Reporter_Exp_Date__c != oldacct.i_Reporter_Exp_Date__c ||
            acct.i_AGP_GDPR_Units__c != oldacct.i_AGP_GDPR_Units__c ||
            acct.i_AGP_Program__c  != oldacct.i_AGP_Program__c ||
            acct.i_AGP_Purch_Date__c != oldacct.i_AGP_Purch_Date__c ||
            acct.i_AG_GDPR_Exp_Date__c != oldacct.i_AG_GDPR_Exp_Date__c ||
            acct.i_AG_GDPR_Price__c != oldacct.i_AG_GDPR_Price__c ||
            acct.i_AG_HIPAA_Customer__c != oldacct.i_AG_HIPAA_Customer__c ||
            acct.i_AG_HIPAA_Exp_Date__c != oldacct.i_AG_HIPAA_Exp_Date__c ||
            acct.i_AG_HIPAA_Price__c != oldacct.i_AG_HIPAA_Price__c ||
            acct.i_AG_HIPAA_Purch_Date__c != oldacct.i_AG_HIPAA_Purch_Date__c ||
            acct.i_AG_HIPAA_Units__c != oldacct.i_AG_HIPAA_Units__c ||
            acct.ob_Cyber_Hawk__c    != oldacct.ob_Cyber_Hawk__c  ||      
            acct.ob_Cyber_Hawk_Date__c    != oldacct.ob_Cyber_Hawk_Date__c   ||      
            acct.ob_Exchange__c    != oldacct.ob_Exchange__c      ||
            acct.ob_Exchange_Date__c    != oldacct.ob_Exchange_Date__c      ||
            acct.ob_GDPR__c    != oldacct.ob_GDPR__c      ||
            acct.ob_GDPR_Date__c    != oldacct.ob_GDPR_Date__c      ||
            acct.ob_HIPAA__c    != oldacct.ob_HIPAA__c      ||
            acct.ob_HIPAA_Date__c    != oldacct.ob_HIPAA_Date__c  ||       
            acct.ob_Inspector__c    != oldacct.ob_Inspector__c    ||
            acct.ob_Inspector_Date__c    != oldacct.ob_Inspector_Date__c ||
            acct.ob_NAM_SAM__c    != oldacct.ob_NAM_SAM__c ||       
            acct.ob_NAM_SAM_Date__c    != oldacct.ob_NAM_SAM_Date__c ||      
            acct.ob_PCI__c    != oldacct.ob_PCI__c ||       
            acct.ob_PCI_Date__c    != oldacct.ob_PCI_Date__c ||      
            acct.ob_Reporter__c    != oldacct.ob_Reporter__c ||      
            acct.ob_Reporter_Date__c    != oldacct.ob_Reporter_Date__c ||    
            acct.ob_SQL__c    != oldacct.ob_SQL__c ||
            acct.ob_SQL_Date__c    != oldacct.ob_SQL_Date__c  ||
            acct.Lead_Status__c != oldacct.Lead_Status__c   ||
            acct.Lead_Status_Reason__c != oldacct.Lead_Status_Reason__c ||
            acct.Already_Being_Worked__c != oldacct.Already_Being_Worked__c ||
            acct.i_DWID_Customer__c != oldacct.i_DWID_Customer__c ||
            acct.i_DWID_Exp_Date__c != oldacct.i_DWID_Exp_Date__c ||
            acct.i_DWID_Level__c != oldacct.i_DWID_Level__c ||
            acct.i_DWID_Price__c != oldacct.i_DWID_Price__c ||
            acct.i_DWID_Purch_Date__c != oldacct.i_DWID_Purch_Date__c ||
            acct.i_AG_CI_Customer__c != oldacct.i_AG_CI_Customer__c ||
            acct.i_AG_CI_Exp_Date__c != oldacct.i_AG_CI_Exp_Date__c ||
            acct.i_AG_CI_Price__c != oldacct.i_AG_CI_Price__c ||
            acct.i_AG_CI_Purch_Date__c != oldacct.i_AG_CI_Purch_Date__c ||
            acct.i_AG_CI_Units__c != oldacct.i_AG_CI_Units__c 
            ) {

                accounts.add(acct);
        }
    }

    ProactiveWatchHelper.UpdateContactDetails(accounts);

 
We have a field called Lead_Rating which is a picklist with options: A+, A, B, C, or D. I am trying to write a workflow rule that will trigger when the Lead_Rating field is changed FROM D or C, to A+, A, or B.

In addition to the above, the rule should only trigger if another field called "Lead_Status" (also a picklist) is equal to one of these 3 values: New, Returning, or Qualified. 

I'm trying the below formula, but am getting: 
Error: Function PRIORVALUE may not be used in this type of formula

AND( 
OR(text(PRIORVALUE( Lead_Status__c )='D'), text(PRIORVALUE(Lead_Status__c )='C')) 
,OR(Lead_Status__c='A', Lead_Status__c='A+', Lead_Status__c='B'))
I'm trying to get a custom activity button to work that will toggle a checkbox field on the contact. It works fine when the field is visible, but fails when I hide the field (needs to be hidden). 

Error I'm getting is:

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

Unexpected token =="
 
{!REQUIRESCRIPT("/soap/ajax/41.0/connection.js")} 

if({!Contact.Onboarding_Survey_Trigger__c} == false) 
{ 
var c = new sforce.SObject("Contact"); 
c.id = "{!Contact.Id}"; 
c.Onboarding_Survey_Trigger__c = true; 
result = sforce.connection.update([c]); 
if ( result[0].getBoolean( "Email Scheduled!" ) ) 
{ 
window.location.reload(); 
} 
else 
{ 
alert( "failed"); 
} 
} 
else 
{ 
var c = new sforce.SObject("Contact"); 
c.id = "{!Contact.Id}"; 
c.Onboarding_Survey_Trigger__c = false; 
result = sforce.connection.update([c]); 
if ( result[0].getBoolean( "Email Scheduled!" ) ) 
{ 
window.location.reload(); 
} 
else 
{ 
alert( "failed"); 
} 
}

 
I'm trying to create a button that will toggle a checkbox (i.e. if checked then uncheck, if unchecked then check). This checkbox will trigger a workflow rule that will send an email to the contact 24 hours later.

I realize that these buttons may become obsolete in Lightning, but my org does not wish to switch in the forseeable future (not my decision).

Any help is much appreaciated!
I created a new process to update an account field (call_stage__c) whenever a new task is created. Basically, it just changes the picklist value to increase to the next call (e.g. call1 to call2, call2 to call3, etc.). This is working just fine when creating tasks for Accounts, but I keep getting this error when creating tasks in Leads. 

I noticed that this only happens when I use a type formula in the process and doesn't seem to happen when type=formula. I have a separate process that works pretty much the same, but I'm using type=picklist (this is under "immediate actions"). The formula I'm using is:

IF(text([Task].Account.Call_Stage__c)= "call1", "call2",
IF(text([Task].Account.Call_Stage__c)= "call2", "call3",
IF(text([Task].Account.Call_Stage__c)= "call3", "call4",
IF(text([Task].Account.Call_Stage__c)= "call4", "call5",
IF(text([Task].Account.Call_Stage__c)= "call5", "call6",
IF(text([Task].Account.Call_Stage__c)= "call6", "call7",
IF(text([Task].Account.Call_Stage__c)= "call7", "call8",
IF(text([Task].Account.Call_Stage__c)= "call8", "call9",
IF(text([Task].Account.Call_Stage__c)= "call9", "call10",
IF(text([Task].Account.Call_Stage__c)= "call10", "call11",
IF(text([Task].Account.Call_Stage__c)= "call11", "call12",
IF(text([Task].Account.Call_Stage__c)= "call12", "call13",
IF(text([Task].Account.Call_Stage__c)= "call13", "call14",
IF(text([Task].Account.Call_Stage__c)= "call14", "call15",
IF(text([Task].Account.Call_Stage__c)= "call15", "call16",
IF(text([Task].Account.Call_Stage__c)= "call16", "call17",
IF(text([Task].Account.Call_Stage__c)= "call17", "call18",
IF(text([Task].Account.Call_Stage__c)= "call18", "call19",
IF(text([Task].Account.Call_Stage__c)= "call19", "call20",null)))))))))))))))))))

I'm getting "The flow failed to access the value for myVariable_current.Account.Call_Stage__c because it hasn't been set or assigned." whenever my process runs ONLY FOR LEADS.

​Any help is much appreciated!
Hello,

The way my organization is setup, accounts need to transfer from one sales rep to another after 60 days of existence. Is there a way to automatically change the "sales rep" field we have on the the account after 60 days, or do we have to do that manually every time?

Thanks in advance!
Hello,

I am trying to add a "records per page button" to salesforce in roder to be able to choose how many records per page to display for any given list.Similar to here: https://www.zoho.com/support/help/images/Recordcount.png

Is there a way to enable/disable this feature, or is this something that needs to be added. At my old company we had this option, but it isn't in my new interface.

Thanks in advance.