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

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
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'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.