• Eric Boller
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies

AND(PRIORVALUE( pi__score__c )< pi__score__c - 25, Lead_Record_Type_Text__c = "School Lead", OR(LastActivityDate < TODAY() +5, LastActivityDate=null) )

Can someone help me with this formula. It worked until I added the syntax ' , OR(LastActivityDate > TODAY() +5, LastActivityDate=null)'. I'm trying to say the last activity date has to be greater than today+ 5 days OR equal to blank.
 

Thanks for the help!

How can I create a trigger (and is a trigger needed?) that updates a field based on the last activity on a lead by lead owner? I currently have the below formula field but that references any activity.

IF(OR(ISBLANK(LastActivityDate), LastActivityDate < (TODAY()-30)), "No", "In Window")
I have the below formula. I'm trying to create a workflow that triggers every time a lead's Pardot score increases by 25+. However, I also get the below error.

PRIORVALUE( pi__score__c )< pi__score__c - 25

Error: Function PRIORVALUE may not be used in this type of formula
How can I create a field that measures the last activity of the lead owner? I currently have the below but that measures any activity.

IF(OR(ISBLANK(LastActivityDate), LastActivityDate < (TODAY()-30)), "No", "In Window")

{!requireScript("/soap/ajax/24.0/connection.js")} var lead = new sforce.SObject("Lead"); lead.Id = "{!Lead.Id}"; lead.Status = "Left VM - Email"; result = sforce.connection.update([lead]); if (result[0].getBoolean("success")) { window.parent.location.href = "/00T/e?followup=1&title=Call$retURL=%2F{!Lead.Id}&who_id= {!Lead.Id}&tsk5=Left+Voicemail&tsk6=Left+a+voicemail+for+{!Lead.Name}&tsk5_fu=FU+VM+w+ {!Lead.Name}+from+{!Lead.Company}&tsk4_fu={!TODAY()+2}";} else { alert("failed to update lead " + result[0]); }

I have the above custom button for leads. It allows reps to click the button, change the status, and create pre-populated tasks.
 

My question is, after save, is clicked on the task, it redirects to the user's home page. How can I make it redirect back to the lead?

AND(PRIORVALUE( pi__score__c )< pi__score__c - 25, Lead_Record_Type_Text__c = "School Lead", OR(LastActivityDate < TODAY() +5, LastActivityDate=null) )

Can someone help me with this formula. It worked until I added the syntax ' , OR(LastActivityDate > TODAY() +5, LastActivityDate=null)'. I'm trying to say the last activity date has to be greater than today+ 5 days OR equal to blank.
 

Thanks for the help!

How can I create a trigger (and is a trigger needed?) that updates a field based on the last activity on a lead by lead owner? I currently have the below formula field but that references any activity.

IF(OR(ISBLANK(LastActivityDate), LastActivityDate < (TODAY()-30)), "No", "In Window")
I have the below formula. I'm trying to create a workflow that triggers every time a lead's Pardot score increases by 25+. However, I also get the below error.

PRIORVALUE( pi__score__c )< pi__score__c - 25

Error: Function PRIORVALUE may not be used in this type of formula

{!requireScript("/soap/ajax/24.0/connection.js")} var lead = new sforce.SObject("Lead"); lead.Id = "{!Lead.Id}"; lead.Status = "Left VM - Email"; result = sforce.connection.update([lead]); if (result[0].getBoolean("success")) { window.parent.location.href = "/00T/e?followup=1&title=Call$retURL=%2F{!Lead.Id}&who_id= {!Lead.Id}&tsk5=Left+Voicemail&tsk6=Left+a+voicemail+for+{!Lead.Name}&tsk5_fu=FU+VM+w+ {!Lead.Name}+from+{!Lead.Company}&tsk4_fu={!TODAY()+2}";} else { alert("failed to update lead " + result[0]); }

I have the above custom button for leads. It allows reps to click the button, change the status, and create pre-populated tasks.
 

My question is, after save, is clicked on the task, it redirects to the user's home page. How can I make it redirect back to the lead?

Hello.  I am not a developer.  The following Java Script pushes contacts from SF into Marketo Campaigns.  Unfotunately it would have to be displayed on all Contact List views.  Does anyone know how I can limit the functionality of this button to specific people?  For example I would want only these two users to be able to push it.  The script is below

User ID = 00560000001VtiU
User ID =00560000001W0HL

function post_to_url(path, params, method) {
method = method || "post";
var form = document.createElement("form");
form.setAttribute("method", method);
form.setAttribute("action", path);

for(var key in params) {
if(params.hasOwnProperty(key)) {
var hiddenField = document.createElement("input");
hiddenField.setAttribute("type", "hidden");
hiddenField.setAttribute("name", String(key));
hiddenField.setAttribute("value", String(params[key]));
form.appendChild(hiddenField);
}
}
document.body.appendChild(form);
form.submit();
}

function build_action_path(actionName) {
var hostname = window.location.hostname;
var server = 'na1';
if (hostname.indexOf(".salesforce.com") != -1){
server = hostname.substring(0,hostname.indexOf(".salesforce.com") );
} else if (hostname.indexOf(".force.com") != -1){
server = hostname.substring(0,hostname.indexOf(".force.com") );
}
return "https://mkto-si." + server + ".visual.force.com/apex/" + actionName;
}

var idArray = {!GETRECORDIDS($ObjectType.Contact)};
if (idArray[0] == null){
alert('Please select at least one row');
} else {
var path = build_action_path("mkto_si__Add_to_Marketo_Campaign");
var method = 'post';
var params = {};
params['contactType'] = 'Contact';
params['contactIds'] = idArray;
params['retUrl'] = encodeURIComponent(document.location.href);
post_to_url(path, params, method);
}