Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
SFDC AdminSFDC Admin 
Desire is to have a VR that will restrict lead conversion if a picklist value is "x". Below is my formula, but the system is still allowing me to convert

AND(
$RecordType.Name ="Type 1",
$RecordType.Name ="Type 2",
IsConverted = TRUE
&&
OR(
ISPICKVAL( Status__c , "New" )
))
Best Answer chosen by SFDC Admin
Dineshsing GiraseDineshsing Girase
Hi,

Try this

AND(
RecordType.Name = "Type 1",
RecordType.Name = "Type 2",
IsConverted == TRUE,
ISPICKVAL( Status__c , "New" )
)

Thanks,
Dinesh
Daniel EnriquezDaniel Enriquez 
Hi Community,

I have a formula field that is too big when compiled, how can I make this formula more compact? What alternatives can I use? I tried to break this up into two formula fields and then pull them into one formula field but that did not work either. They need to be in one field in order to pull a csv file with all the data compiled into one cell



/* Monday Hours */
IF(
OR(
TEXT(Monday_Start__c) = "Closed",
TEXT(Monday_End__c) = "Closed"
),
"Closed",
IF(
OR(
ISBLANK(TEXT(Monday_Start__c)),
ISBLANK(TEXT(Monday_End__c))
),
"",
"Monday" & " " & TEXT(Monday_Start__c) & " - " & TEXT(Monday_End__c) & BR()
)) &
/* Tuesday Hours */
IF(
OR(
TEXT(Tuesday_Start__c) = "Closed",
TEXT(Tuesday_End__c) = "Closed"
),
"Closed",
IF(
OR(
ISBLANK(TEXT(Tuesday_Start__c)),
ISBLANK(TEXT(Tuesday_End__c))
),
"",
"Tuesday" & " " & TEXT(Tuesday_Start__c) & " - " & TEXT(Tuesday_End__c) & BR ()
)) &
/* Wednesday Hours */
IF(
OR(
TEXT(Wednesday_Start__c) = "Closed",
TEXT(Wednesday_End__c) = "Closed"
),
"Closed",
IF(
OR(
ISBLANK(TEXT(Wednesday_Start__c)),
ISBLANK(TEXT(Wednesday_End__c))
),
"",
"Wednesday" & " " & TEXT(Wednesday_Start__c) & " - " & TEXT(Wednesday_End__c) & BR ()
)) &
/* Thursday Hours */
IF(
OR(
TEXT(Thursday_Start__c) = "Closed",
TEXT(Thursday_End__c) = "Closed"
),
"Closed",
IF(
OR(
ISBLANK(TEXT(Thursday_Start__c)),
ISBLANK(TEXT(Thursday_End__c))
),
"",
"Thursday" & " " & TEXT(Thursday_Start__c) & " - " & TEXT(Thursday_End__c) & BR ()
)) &

/* Friday Hours */
IF(
OR(
TEXT(Friday_Start__c) = "Closed",
TEXT(Friday_End__c) = "Closed"
),
"Closed",
IF(
OR(
ISBLANK(TEXT(Friday_Start__c)),
ISBLANK(TEXT(Friday_End__c))
),
"",
"Friday" & " " & TEXT(Friday_Start__c) & " - " & TEXT(Friday_End__c) & BR ()
)) &
/* Saturday Hours */
IF(
OR(
TEXT(Saturday_Start__c) = "Closed",
TEXT(Saturday_End__c) = "Closed"
),
"Closed",
IF(
OR(
ISBLANK(TEXT(Saturday_Start__c)),
ISBLANK(TEXT(Saturday_End__c))
),
"",
"Saturday" & " " & TEXT(Saturday_Start__c) & " - " & TEXT(Saturday_End__c) & BR ()
)) &
/* Sunday Hours */
IF(
OR(
TEXT(Sunday_Start__c) = "Closed",
TEXT(Sunday_End__c) = "Closed"
),
"Closed",
IF(
OR(
ISBLANK(TEXT(Sunday_Start__c)),
ISBLANK(TEXT(Sunday_End__c))
),
"",
"Sunday" & " " & TEXT(Sunday_Start__c) & " - " & TEXT(Sunday_End__c) & BR()
))


Error: Compiled formula is too big to execute (7,998 characters). Maximum size is 5,000 characters
Best Answer chosen by Daniel Enriquez
Amnon KruviAmnon Kruvi
I don't see how CASE can be utilised here. It isn't some kind of magic bullet :) 
 
You may need to move this formula from a formula field, and into process builder (which supports longer formulas) that writes the result into a regular long text field. 
Nicola BiddleNicola Biddle 
Hi there,

I need to create a currency formula field to auto calculate the GST based on the GST method picklist option selected. Example:-
 
When GST method is set as Margin Scheme – GST withholding is $List Price divide by 11 – e.g. $280,000 is $25,454.54
When GST method is set as Taxable Supply – GST withholding is $List Price multiple by 7% – e.g. $280,000 is $19,600
When GST method in the Lot is set as GST Free – GST withholding is $0
 I've started but failed!

AND(
((ISPICKVAL(GST_Method__c,"Margin Scheme")) Price__c*0.11)),
(ISPICKVAL(GST_Method__c,"Taxable Supply"), Price__c*0.7),
(ISPICKVAL(GST_Method__c,"GST Free"), Price__c=0)))

Cheers, 
NB
Best Answer chosen by Nicola Biddle
Keiji OtsuboKeiji Otsubo
Hi,

I feel like I've answered a similar question.If you don't like it, skip it. I will be careful in the future.

CASE(GST_Method__c,"Margin Scheme",Price__c*0.11,
"Taxable Supply", Price__c*0.7,
"GST Free", 0,
0)
 
joez Jojoez Jo 

Hi

Please help me with the Workflow Rule :

 If Lead.Stage isChanged and is equal to 'x(picklist)'
And either lead field  Customfield1 or customfield2,  equal 'y'
update record

 

Best Answer chosen by joez Jo
joez Jojoez Jo

Thankyou keiji, i'm new Admin

need one small modiication 

If Lead.Stage isChanged and is equal to 'x(picklist)'
And either lead field  Customfield1 or customfield2,  equal 'y(picklist)'
update record

can you pls help

Thanksvery much

 

Jeanette AlbertJeanette Albert 
Hi,

This formula works good however, when a different record type was being use the email alert still came?  I think the OR should be removed.

If RecordType.Name = "Appeals-Legal" AND CASE( Appeal_Category__c,  those listed AND if any of those 5 date fields have be changed than send the email alert.

OR(
AND(
RecordType.Name = "Appeals-Legal",
CASE( Appeal_Category__c,
"HCBS-BI", 1,
"HCBS-CES", 1,
"HCBS-Childrens", 1,
"HCBS-CHRP", 1,
"HCBS-CLLI", 1,
"HCBS-CMHS", 1,
"HCBS-CWA", 1,
"HCBS-DD", 1,
"HCBS-EBD", 1,
"HCBS-SCI", 1,
"HCBS-SLS", 1,
"HCBS-MI", 1,
0) = 1),
ISCHANGED( Date_ID_or_IDDA_Noticed_to_Parties__c ),
ISCHANGED( Date_of_Notice_of_Exceptions__c ),
ISCHANGED( Date_Final_Agency_Decision_Mailed__c ),
ISCHANGED( Date_Motion_for_Reconsideration_notice_t__c ),
ISCHANGED( Hearing_Date_Scheduled__c)
)

Thanks, 
Jeanette
Best Answer chosen by Jeanette Albert
Tony TrinhTony Trinh
Hi Jeanette,

You just need to change where the OR is placed. Covering all the ISCHANGED conditions:
AND(
RecordType.Name = "Appeals-Legal",
CASE( Appeal_Category__c,
"HCBS-BI", 1,
"HCBS-CES", 1,
"HCBS-Childrens", 1,
"HCBS-CHRP", 1,
"HCBS-CLLI", 1,
"HCBS-CMHS", 1,
"HCBS-CWA", 1,
"HCBS-DD", 1,
"HCBS-EBD", 1,
"HCBS-SCI", 1,
"HCBS-SLS", 1,
"HCBS-MI", 1,
0) = 1,
OR(
ISCHANGED( Date_ID_or_IDDA_Noticed_to_Parties__c ),
ISCHANGED( Date_of_Notice_of_Exceptions__c ),
ISCHANGED( Date_Final_Agency_Decision_Mailed__c ),
ISCHANGED( Date_Motion_for_Reconsideration_notice_t__c ),
ISCHANGED( Hearing_Date_Scheduled__c)
)
)
Jordy23 BJordy23 B 
Hi

Can you please help me, I am trying to create a VR that has the following condition

Status field can get updated to the value 'Marketing action' ONLY if the following Fields are filled in:
“Name” AND “Account Name” AND “Account No.” AND “Beneficiary” AND (“Code” OR “Unified”) 

how do i create such condition?

THANK YOU
Best Answer chosen by Jordy23 B
Tony TrinhTony Trinh
Hi Jordy,

Try this:
AND(
ISCHANGED(Status__c),
ISPICKVAL(Status__c, "Marketing action"),
OR(
ISBLANK(Account_Name__c),
ISBLANK(Account_No__c),
ISBLANK(Beneficiary__c),
AND(
ISBLANK(Code__c),
ISBLANK(Unified__c)
)
)
)
Not sure what all the field types are. This may need some adjustments.
Karan ParikhKaran Parikh 
Hello,

I want to add/delete (basic edit) the values in the Picklist value sets. I am not sure whether we can edit Picklist value sets once they are created.
Also, if we can edit that. I want to use these updated Picklist value sets for my fields.

Hoping for a solution. Thanks in advance.
 
Best Answer chosen by Karan Parikh
Tony TrinhTony Trinh
Hi Karan,

You can go to Setup and search the term "Picklist" and click on the "Picklist Value Sets"
When you are including these new values, please make sure to check the "Add the new picklist values to all Record Types that use this Global Value Set." to ensure they are not omitted based on Record Type.
Clare HealyClare Healy 
Hello Trailblazers,

I'm working on some documentation to support my Marketing team in understanding and interpreting Campaign Metrics. I'm trying to help them better understand these numbers so that they have higher confidence in the Marketing reporting and ROI.

I'm running up against an issue that I can't seem to find any answers for. We have a couple of campaigns where the Converted Leads in Campaign # is higher than the Opportunities in Campaign.

snapshot of the campaign metrics section of the campaign details tab - highlighted is the count of converted leads in campaign (35) and opportunities in campaign (32)


I know it's possible for the number of opportunities to be larger because a user could manually create an opportunity. But I'm puzzled as to why the converted leads could be larger than the number of opportunities. Does anyone have any idea what could be going on here?

Thanks!
Clare
Best Answer chosen by Clare Healy
Steve MolisSteve Molis
a user does not have to create an Opportunity upon Convert, they can just create a new Account/Contact, or convert/merge it to an existing record as well
Dat NinthDat Ninth 
This Lesson is so confusing for me and I am starting to question my own ability to grasp this concept of understanding. Please help.
Best Answer chosen by Dat Ninth
Keiji OtsuboKeiji Otsubo
Hi Dat,

Please check this article.

https://www.youtube.com/watch?v=It11TFRgnbY
David GrayDavid Gray 
I'm trying to create a custom field that concatenates the standard 'Discount' field (on Opportunity Object) with the Percent Sign (%).

The standard field will take a 30% discount and display it as: 30.
I can't figure out how to create a custom field that will re-display it as: 30%
Best Answer chosen by David Gray
Steve MolisSteve Molis
So basically a Text field that displays "30%"? 

Like this
TEXT( Discount * 100 ) + "%"