• Rung41
  • NEWBIE
  • 305 Points
  • Member since 2009

  • Chatter
    Feed
  • 2
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 92
    Questions
  • 103
    Replies

Is it possible to add a an IF statement in a web to lead form to set the lead record type?
If drop-down value equals A, update the lead record type ID to X

If drop-down value equals B, update the lead record type ID to Y

If drop-down value equals C, update the lead record type ID to Z

  • August 09, 2019
  • Like
  • 0
I have developed a method via Process Builder to create an Opportunity from a convert a Lead. (Basic criteria= Is Lead converted, Yes, create Opportunity record.) However,  during the conversion the Lead Task records only get associated to the Contact record and not the Opportunity. Any insights on how I could also relate the Task to the Opportunity?
  • August 06, 2019
  • Like
  • 0
I'm having some trouble creating a formula that looks at two sets of criteria to set a currency value. The first set of criteria works fine but when I try to add an additional AND statement, it throws an error. Any and all feedback as to what I am doing wrong  is appreciated.
 
IF( 
AND( 
NOT(ISBLANK( Referred_By__c)), 
TEXT( Referred_By__r.Receive_Referral_Incentives__c) <> 'No', 
ISPICKVAL(Account.Market_Segment__c, 'Apartment Community') || ISPICKVAL(Account.Market_Segment__c, 'Property Management' ), 
ISPICKVAL( Type__c ,'Individual')), 
IF(ISBLANK(Amount),0,
IF((ISPICKVAL(Lease_Term__c, '1')&& Amount < 1500),0, IF((ISPICKVAL(Lease_Term__c, '1')&& Amount >= 1500),75, 
IF((ISPICKVAL(Lease_Term__c, '2')&& Amount < 750),0, IF((ISPICKVAL(Lease_Term__c, '2')&& Amount >= 750),75, 
IF((ISPICKVAL(Lease_Term__c, '3')&& Amount < Region_Minimums_Copy__c ),0, 
IF((ISPICKVAL(Lease_Term__c, '3')&& Amount >= Region_Minimums_Copy__c && Amount <= 499 ), 150, 
IF((ISPICKVAL(Lease_Term__c, '3')&& Amount >= 500 && Amount <= 899), 200, 
IF((ISPICKVAL(Lease_Term__c, '3')&& Amount >= 900), 250, 
IF((ISPICKVAL(Lease_Term__c, '6')&& Amount < Region_Minimums_Copy__c),0, 
IF((ISPICKVAL(Lease_Term__c, '6')&& Amount >= Region_Minimums_Copy__c && Amount <= 499 ), 250, 
IF((ISPICKVAL(Lease_Term__c, '6')&& Amount >= 500 && Amount <= 899), 300, 
IF((ISPICKVAL(Lease_Term__c, '6')&& Amount >= 900),350, 
IF((ISPICKVAL(Lease_Term__c, '12')&& Amount < Region_Minimums_Copy__c), 0, IF((ISPICKVAL(Lease_Term__c, '12') && Amount >= Region_Minimums_Copy__c && Amount <= 499),350, IF((ISPICKVAL(Lease_Term__c, '12') && Amount >= 500 && Amount <= 899),400, IF((ISPICKVAL(Lease_Term__c, '12') && Amount >= 900), 450,0 ))))))))))))))))),0)

IF(
AND( ISPICKVAL(Account.Market_Segment__c, 'Apartment Community') || ISPICKVAL(Account.Market_Segment__c, 'Property Management' ), TEXT(Customer_Name__r.Receive_Referral_Incentives__c) <> 'No', 
ISPICKVAL( Type__c ,'In-house Corporate'),100,0),0 )
As part of the Lead conversion process I have disabled the ability to create an Opportunity and replaced the Opportunity creation via a Process builder flow.  However, I am experiencing an issue where a Task with an empty subject field is automatically created. Any thoughts/ideas how I can prevent the Task creation?

Thanks!

I have two Task RecordTypes, "A" & "Z". For recordtype "A" I have the validation rule below. 
When converting a Lead, I used recordType Z" as the optional Task.  However, when trying to convert a Lead, the validation rule for RecordType A" is being triggered. Any thoughts as what would cause this?

 

AND( 
RecordTypeId = "01213000001WIIc",
( 
IF(Option1__c, 1 , 0) + 
IF(Option2__c, 1 , 0) + 
IF(Option3__c, 1 , 0) + 
IF(Option4__c , 1 , 0) + 
IF(Option5__c , 1 , 0) < 1)
)

I got to imagine there is a more effcient way to compose my formula.  Is there a way to reference "NOT(ISBLANK( Referred_By__c))" once instead of in each IF statement?  

Thanks in advance!

IF(
   ISPICKVAL(Lease_Term__c, '1') && NOT(ISBLANK( Referred_By__c)), 75,
IF(
   ISPICKVAL(Lease_Term__c, '2')&& NOT(ISBLANK( Referred_By__c)), 75,
IF(
   (ISPICKVAL(Lease_Term__c, '3') &&  Amount < 500) && NOT(ISBLANK( Referred_By__c)), 200,
IF(
   (ISPICKVAL(Lease_Term__c, '3') &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 325,
IF(
   (ISPICKVAL(Lease_Term__c, '3') &&  Amount >= 900)&& NOT(ISBLANK( Referred_By__c)), 450,
IF(
   (ISPICKVAL(Lease_Term__c, '6') &&  Amount < 500 && NOT(ISBLANK( Referred_By__c))), 275,
IF(
   (ISPICKVAL(Lease_Term__c, '6') &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 400,
IF(
   (ISPICKVAL(Lease_Term__c, '6') &&  Amount >= 900&& NOT(ISBLANK( Referred_By__c))), 525,
IF(
   (ISPICKVAL(Lease_Term__c, '9') &&  Amount < 500)&& NOT(ISBLANK( Referred_By__c)), 275,
IF(
   (ISPICKVAL(Lease_Term__c, '9') &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 400,
IF(
   (ISPICKVAL(Lease_Term__c, '9') &&  Amount >= 900)&& NOT(ISBLANK( Referred_By__c)), 525,
IF(
   (CONTAINS("12:18:24:36",Text(Lease_Term__c)) &&  Amount < 500) && NOT(ISBLANK( Referred_By__c)), 325,
IF(
   (CONTAINS("12:18:24:36",Text(Lease_Term__c)) &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 450,
IF(
   (CONTAINS("12:18:24:36",Text(Lease_Term__c)) &&  Amount >= 900)&& NOT(ISBLANK( Referred_By__c)), 575,NULL))))))))))))))

 
  • April 11, 2019
  • Like
  • 0
I am having trouble with a valdiation formula that checks two sets of criteria.
Criteria 1 - Field A = Yes AND Field B's number field is greater than 0.
Criteria 2 - Field A = Yes AND Field B's number field is greater than 0 AND Field C = Yes AND Field D not equal to BLANK

The first and second criteria reference the same elements but should be independent of each other. My formula "seems" to workfor Criteria 2 but not 1.

AND( NOT(ISPICKVAL(Furniture_Delivered_Model_Setup__c, 'No')), Attachment_Added__c>0, OR( AND( NOT(ISPICKVAL(Virtual_Tour__c, 'No')), NOT(ISBLANK(Model_Promo_Virtual_Tour__c)), NOT(ISPICKVAL(Furniture_Delivered_Model_Setup__c, 'No')), Attachment_Added__c>0) ))

Any help is greatly appreciated
  • February 20, 2019
  • Like
  • 0
I am trying to create a flow that queries all the Contact's records for an email that matches an email on the Lead record and then updates a custom Contact lookup field on the Lead record with the matching Contact. I'm sort of lost as where to start. A fast lookup on the lead or a fast lookup on the Contact record? And which record fields to save in the variable?

Any and all insights or help is appreciated.
  • January 10, 2019
  • Like
  • 0
Is it possible using VisualForce to display two Contact related lists on the Account object?  Ideally, I would like to seperate the contacts based on recordtype.
  • January 07, 2019
  • Like
  • 0
All of a sudden my onClick JavaScript button is throwing an error. "Invalid or unexpected token"
The odd thing is the same button in my development org is working fine.
 
var type = '{!Opportunity.Type__c}'; 
if(type != "Guest Suite") { 
alert('At this time a Virtual Tour can only be requested for Guest Suites'); 
} 
else{ 
window.open('/a0J/e?\ 
&CF00N1B00000B8jle={!Opportunity.Name}\ 
&CF00N1B00000B8jle_lkid={!Opportunity.Id}\ 
&00N1B00000B8jll={!Opportunity.Account}\ 
&00N1B00000B8jlp={!Account.BillingStreet}\ 
&00N1B00000B8jlf={!Account.BillingCity}\ 
&00N1B00000B8jlo={!Account.BillingStateCode}\ 
&00N1B00000B8jls={!Account.BillingPostalCode}\ 
&00N1B00000B8jlg={!Opportunity.Delivery_Date__c}\ 
&00N1B00000B8jpM={!Opportunity.Lease_Agreement_Number__c}\ 
&retURL={!Virtual_Tour__c.Id}'); 
}

Any thoughts as to why?
  • October 26, 2018
  • Like
  • 0

I am trying to remove white space from a VF email template created from line-breaks associated with conditional IF statements. If all the conditions are meet, the email spacing is fine. However, if none of the conditions are meet, the email renders with a large white space. Is there a better way to render the data?

Here is my IF Statement

{!IF(relatedTo.hardcover_formula__c == 'Yes',A, NULL)} <br /><br />
{!IF(relatedTo.hardcover_formula__c == 'Yes','B NULL)} <br />
{!IF(relatedTo.ship_to_formula__c == 'Other', C, NULL)}<br /><br /><br />

Thanks in advance!

  • April 25, 2018
  • Like
  • 0

I've hit a road block trying to conditionally show a value based on a picklist field and looking for some assistance as to what I am doing wrong.

I am trying to show the field value of "Other_Shipping_Address__c" if the picklist value of 'Other' is selected from the field Hardcover_Book_Ship_to_location__c. 

I've tried the following IF statement but keep getting the error of  Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Picklist, received Text

{!IF(ISPICKVAL("{!relatedTo.Hardcover_Book_Ship_to_location__c}", 'Other'),"{!relatedTo.Other_Shipping_Address__c}", NULL)} 

 

  • April 24, 2018
  • Like
  • 0

For some reason I keep getting the error "Unexpected Token Else" and I can't figure out why.

If(
{!Model_Promo_Request__c.Model_Promo_Criteria_Validation__c} == TRUE)
{
window.open('{!URLFOR($Action.Model_Promo_Request__c.Submit,Model_Promo_Request__c.Id)}');
}
else{ 
alert('Your request is missing information required for approval.');
}
  • April 13, 2018
  • Like
  • 0

I am trying to include some static text when a field renders from an IF statement. However, I can't figure how to do this. Anyone willing to assist?

I want to include the verbiage "Hardbook Quantity:" along with the rendering of {!relatedTo.Hardbook_Quantity__c}

Here is what I have so far:
<apex:outputField rendered="{IF(TEXT(!relatedTo.Hardcover_Book__c !> 'No'))}" />  <br />
 {!relatedTo.Hardbook_Quantity__c} <br /><br />

  • April 06, 2018
  • Like
  • 0

Hello, I am new to Visual Workflows and trying to develop a flow that will look at the Stage & Type field on all the Opportunities associated with an Account and update a field on the Account record based on the following.

  • If at least one Opportunity has an Approved stage, update the Account field with Approved - Active
  • If the stage of  every Opportunity is Pending, update the Account with Pending
  • If the stage of every Opportunity is Decline, update the Account field with Declined
  • If the stage of every Opportunity is Approved-Not Active, update the Account field with Approved - Not Active
The Flow finishes but the Account record is not updating. I think the fault lies in my decision logic but I am not sure. I have Stage "Approved" set to "One condition must be true" and all the other stages set to "All conditions must be true".  Depending on the decision, I route the logic to the applicable Update Record module

User-added image Flow Diagram

User-added image Fast Lookup. Query all Opportunities with a specific value in the Type field. Assign the records to GetOppID var along with AccountID & StageName
User-added image Decision logic for an Approved Opportunity
User-added image Decision logic for a Declined Opportunity
User-added image Update the Account based on the Approved Decision. The other update modules a built in the same fashion.

Any & all tips or insights are appreciated!

  • January 31, 2018
  • Like
  • 0
Is there a way to capture which users are currently viewing a record? We want to make use of the console view but don't want users accessing a record if another user is already viewing it.
  • March 02, 2017
  • Like
  • 0

I'm trying to add a custom attribute to the Salesforce1 app to force the email client to the Outlook app but with no luck. Can anyone help?

I applied the following

Attribute Key: FORCE_EMAIL​_CLIENT_TO

Attribute Value: "ms-outlook://​compose?to="

  • January 30, 2017
  • Like
  • 1
I'm trying to implement an OnClick Javacript Button to only allow users with a certain profile to use the button. However, I keep getting the following error. Unterminated String constant.

Any help would be appreciated.
if("{!User.ProfileId}" = "00e30000000tnOY")
{ 
alert("Nice try, think again."); 
} 
else{ 
window.location = "/006/e?retURL={!Account.Id} 
&accid={!Account.Id} 
&RecordType=012a0000001ZSiy 
&ent=Opportunity&opp3="Opportunity" 
&opp11="New" 
&opp9={!TODAY()+30}"; 
}



 
  • November 11, 2016
  • Like
  • 0
Is it possible to use a URL hack in a hyperlink formula? I am trying create a custome link that only certain profiles can see but I am running into syntax issues.
IF(CONTAINS($Profile.Name,"System Administrator"),
HYPERLINK("/006/e?="
&accid=Account.Id
&RecordType=012a0000001ZSiy
&ent=Opportunity
&opp3=New Sale
&opp11=New
&opp9=TODAY()+30
&retURL="&Account.Id
, "Create New Opp" )," ")
  • November 09, 2016
  • Like
  • 0
I have the following task validation rule to prevent a text box from being populated unless a specific picklist value is specified. However, even if the text box is blank, the validation rule still fires and displays the error. Help!


AND(
NOT(ISPICKVAL(Status,"Completed")),
NOT(ISNULL(Description)))
  • November 02, 2016
  • Like
  • 0

I'm trying to add a custom attribute to the Salesforce1 app to force the email client to the Outlook app but with no luck. Can anyone help?

I applied the following

Attribute Key: FORCE_EMAIL​_CLIENT_TO

Attribute Value: "ms-outlook://​compose?to="

  • January 30, 2017
  • Like
  • 1
Can anyone point me in the right direction where I could find out how to pass the value of a picklist on the Account object to a similar picklist on VF Log A Call page. I am trying to create a dependent picklist on my VF Log A Call page but have the value predefined by a picklist value on the realted Account page.
  • February 23, 2016
  • Like
  • 1

Trying to create a "New Event" button, when clicked, will automatically set the Event duration to 30 mins. I don't get a syntax error in my code but when I test it, the Event duration remains at the default 1 hour.

 

Here is my code.

 

/00U/e?title=Outside Sales Call&who_id={!Lead.Id}{!Contact.Id}&what_id={!Opportunity.Id}{!Account.Id}
{!Event.DurationInMinutes = 30}
&followup=1&tsk5=Outside Sales Call&retURL=%2F{!Lead.Id}{!Contact.Id}{!Opportunity.Id}{!Account.Id}

 

Thanks!

  • December 15, 2010
  • Like
  • 1

I got to imagine there is a more effcient way to compose my formula.  Is there a way to reference "NOT(ISBLANK( Referred_By__c))" once instead of in each IF statement?  

Thanks in advance!

IF(
   ISPICKVAL(Lease_Term__c, '1') && NOT(ISBLANK( Referred_By__c)), 75,
IF(
   ISPICKVAL(Lease_Term__c, '2')&& NOT(ISBLANK( Referred_By__c)), 75,
IF(
   (ISPICKVAL(Lease_Term__c, '3') &&  Amount < 500) && NOT(ISBLANK( Referred_By__c)), 200,
IF(
   (ISPICKVAL(Lease_Term__c, '3') &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 325,
IF(
   (ISPICKVAL(Lease_Term__c, '3') &&  Amount >= 900)&& NOT(ISBLANK( Referred_By__c)), 450,
IF(
   (ISPICKVAL(Lease_Term__c, '6') &&  Amount < 500 && NOT(ISBLANK( Referred_By__c))), 275,
IF(
   (ISPICKVAL(Lease_Term__c, '6') &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 400,
IF(
   (ISPICKVAL(Lease_Term__c, '6') &&  Amount >= 900&& NOT(ISBLANK( Referred_By__c))), 525,
IF(
   (ISPICKVAL(Lease_Term__c, '9') &&  Amount < 500)&& NOT(ISBLANK( Referred_By__c)), 275,
IF(
   (ISPICKVAL(Lease_Term__c, '9') &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 400,
IF(
   (ISPICKVAL(Lease_Term__c, '9') &&  Amount >= 900)&& NOT(ISBLANK( Referred_By__c)), 525,
IF(
   (CONTAINS("12:18:24:36",Text(Lease_Term__c)) &&  Amount < 500) && NOT(ISBLANK( Referred_By__c)), 325,
IF(
   (CONTAINS("12:18:24:36",Text(Lease_Term__c)) &&  Amount <= 899) && NOT(ISBLANK( Referred_By__c)), 450,
IF(
   (CONTAINS("12:18:24:36",Text(Lease_Term__c)) &&  Amount >= 900)&& NOT(ISBLANK( Referred_By__c)), 575,NULL))))))))))))))

 
  • April 11, 2019
  • Like
  • 0
I am having trouble with a valdiation formula that checks two sets of criteria.
Criteria 1 - Field A = Yes AND Field B's number field is greater than 0.
Criteria 2 - Field A = Yes AND Field B's number field is greater than 0 AND Field C = Yes AND Field D not equal to BLANK

The first and second criteria reference the same elements but should be independent of each other. My formula "seems" to workfor Criteria 2 but not 1.

AND( NOT(ISPICKVAL(Furniture_Delivered_Model_Setup__c, 'No')), Attachment_Added__c>0, OR( AND( NOT(ISPICKVAL(Virtual_Tour__c, 'No')), NOT(ISBLANK(Model_Promo_Virtual_Tour__c)), NOT(ISPICKVAL(Furniture_Delivered_Model_Setup__c, 'No')), Attachment_Added__c>0) ))

Any help is greatly appreciated
  • February 20, 2019
  • Like
  • 0

I am trying to remove white space from a VF email template created from line-breaks associated with conditional IF statements. If all the conditions are meet, the email spacing is fine. However, if none of the conditions are meet, the email renders with a large white space. Is there a better way to render the data?

Here is my IF Statement

{!IF(relatedTo.hardcover_formula__c == 'Yes',A, NULL)} <br /><br />
{!IF(relatedTo.hardcover_formula__c == 'Yes','B NULL)} <br />
{!IF(relatedTo.ship_to_formula__c == 'Other', C, NULL)}<br /><br /><br />

Thanks in advance!

  • April 25, 2018
  • Like
  • 0

I've hit a road block trying to conditionally show a value based on a picklist field and looking for some assistance as to what I am doing wrong.

I am trying to show the field value of "Other_Shipping_Address__c" if the picklist value of 'Other' is selected from the field Hardcover_Book_Ship_to_location__c. 

I've tried the following IF statement but keep getting the error of  Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Picklist, received Text

{!IF(ISPICKVAL("{!relatedTo.Hardcover_Book_Ship_to_location__c}", 'Other'),"{!relatedTo.Other_Shipping_Address__c}", NULL)} 

 

  • April 24, 2018
  • Like
  • 0

For some reason I keep getting the error "Unexpected Token Else" and I can't figure out why.

If(
{!Model_Promo_Request__c.Model_Promo_Criteria_Validation__c} == TRUE)
{
window.open('{!URLFOR($Action.Model_Promo_Request__c.Submit,Model_Promo_Request__c.Id)}');
}
else{ 
alert('Your request is missing information required for approval.');
}
  • April 13, 2018
  • Like
  • 0

I am trying to include some static text when a field renders from an IF statement. However, I can't figure how to do this. Anyone willing to assist?

I want to include the verbiage "Hardbook Quantity:" along with the rendering of {!relatedTo.Hardbook_Quantity__c}

Here is what I have so far:
<apex:outputField rendered="{IF(TEXT(!relatedTo.Hardcover_Book__c !> 'No'))}" />  <br />
 {!relatedTo.Hardbook_Quantity__c} <br /><br />

  • April 06, 2018
  • Like
  • 0
Is there a way to capture which users are currently viewing a record? We want to make use of the console view but don't want users accessing a record if another user is already viewing it.
  • March 02, 2017
  • Like
  • 0
I am considering implementing Lightning for Outlook for a few clients so they can use the Salesforce Console within Outlook. Is it ready to use on mobile devices yet? iPhone?
I have the following task validation rule to prevent a text box from being populated unless a specific picklist value is specified. However, even if the text box is blank, the validation rule still fires and displays the error. Help!


AND(
NOT(ISPICKVAL(Status,"Completed")),
NOT(ISNULL(Description)))
  • November 02, 2016
  • Like
  • 0
Here my situation. I am getting data from a 3rd party (60k records) and in this data they assoicate mulitple unique IDs with an address location that I can tied back to a Salesforce Account. I'm trying to figure out what is the best solution to build this association in Salesforce. Is it through the use of junction object, trigger, etc?

Any suggestions would be appreciated.
  • August 16, 2016
  • Like
  • 0
I'm looking for validation rule to prevent two Multi-Select fields (Accomplished__c & Next_Steps__c) from being populated unless the Task staus is set to "Completed". This is how far I have gotten but not sure how to indicate the two multi-select fields need to be blank or if my current logic is correct so far.

AND(
NOT(ISPICKVAL(Status,"Completed")),
  • August 03, 2016
  • Like
  • 0
I am running into a complie error - Formula size is to big execute. Look for any assistance how I can simplify my formula. Thanks in advance!

IF(
(ISPICKVAL(Minimum_Lease_Terms__c,"3") || ISPICKVAL(Minimum_Lease_Terms__c,"4")),15.20, 
IF(
(ISPICKVAL(Minimum_Lease_Terms__c,"5") || ISPICKVAL(Minimum_Lease_Terms__c,"6") || ISPICKVAL(Minimum_Lease_Terms__c,"7")), 11.40, 
IF(
(ISPICKVAL(Minimum_Lease_Terms__c,"8") || ISPICKVAL(Minimum_Lease_Terms__c,"9")),7.60, 
IF
(ISPICKVAL(Minimum_Lease_Terms__c,"1") || (ISPICKVAL(Minimum_Lease_Terms__c,"2") ||(ISPICKVAL(Minimum_Lease_Terms__c,"10") || ISPICKVAL(Minimum_Lease_Terms__c,"11") || ISPICKVAL(Minimum_Lease_Terms__c,"12"))), 1.90, NULL ))))
Trying to write a formula that compares two date fields only if one of the date fields is NOT blank.

Here is what I have so far.
IF(
Last_Sales_Call__c  >  Last_Telephone_Sales_Call__c,"Yes","No")

Basically I need the formula to compare Last Sales Call vs Last Telephone Sales Call only if the Last Telephone Sales Call is NOT blank.