Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Saf BurkiSaf Burki 
Hi guys,

Hope you're well.

I'm struggling to understand where my VR is wrong here.

I've created a decimal field which essentially calculates the difference between UnitPrice and ListPrice. And I created a VR rule which should prevent users from adding this product onto the Opportunity if the decimal field is smaller than -0.1

My validation rule:

AND(
Opportunity.Approved__c = FALSE,
CPV_Discount_Decimal__c < -0.1)

And yet, with this rule in place, I am still able to enter my product against the opportunity when I have a ListPrice of 0.35 and a UnitPrice of 0.02.

Any ideas would be greatly appreciated!

Cheers,
Saf
Best Answer chosen by Saf Burki
Eric PraudEric Praud
That looks correct then.
Can you try to debug a little:
1- Set your validation to Opportunity.Approved__c = FALSE only, and see if it triggers
2- Set your validation to CPV_Discount_Decimal__c < -0.1 only, and see if it triggers
3- Try this instead:
AND(
Opportunity.Approved__c = FALSE,
UnitPrice-ListPrice< -0.1)

 
Gabe SanchezGabe Sanchez 

Hello all! 

I am trying to concatenate a few different fields into one with a '-' in between. I actually got it to go with no syntax errors, but it only displayed the names of the fields on the case and not what the values are. So I would like the output to be :

Account Brand - Account Name - NSN

Label.                         API                                      Type
Account Brand.         Account_Brand__c               Formula (Text)
Account Name          AccountId                              Lookup(Account)
NSN                          NSN__c                                 Formula (Text)

Any ideas on how I could make this work?
 

Best Answer chosen by Gabe Sanchez
Usman AliUsman Ali
Gabe, 
It should be like this... 
 
BLANKVALUE(Account_Brand__c, '') + ' - ' + BLANKVALUE(Account.Name, '') + ' - ' + BLANKVALUE(NSN__c, '')

 
Best Answer chosen by Paula Drewicz
Eric PraudEric Praud
Hi Paula,

You can indeed with 2 separate date filters:
ie: Date Greater than 1/1/2021
Date Less or equal to - Relative date - TODAY
Tim ShuttleworthTim Shuttleworth 
I want to check a multi select picklist to see if ONLY Value A has been chosen and if another Checkbox field is not checked.
If Value A is chosen and Value B is NOT chosen and the Checkbox is NOT checked, I want to throw an error message on the Checkbox Field. 

Picklist name Partner_Type__c, 
Checkbox Name Interested_in_Joining__c

This is all on the same object. Can someone please help?
Best Answer chosen by Tim Shuttleworth
Keiji OtsuboKeiji Otsubo
Hi,



AND( 
INCLUDES( Partner_Type__c,"A"),
NOT (INCLUDES( Partner_Type__c,";") ),
NOT(Interested_in_Joining__c)
)
 
Pamela WakemanPamela Wakeman 

I'm trying to group three fields together into one Row Level formula.

The error I receive is "Error when encoding row-level formula: Incorrect number of parameters for function 'IF()'. Expected 3, received 4."

I see only three parameters...What do I have wrong?

IF(
OR(
Contact.SKP_PRO_YR_WEB__c >= 1,
Contact.SKP_SHOP_YR_WEB__c >= 1,
Contact.SKP_STDO_YR_WEB__c >= 1
),
"Pro",
"Shop",
"Studio"
)

Best Answer chosen by Pamela Wakeman
Ankush AgarwalAnkush Agarwal
Hi Pamela,

You may try with below updated formula:

IF(Contact.SKP_PRO_YR_WEB__c >= 1,
"Pro",
IF(Contact.SKP_SHOP_YR_WEB__c >= 1,
"Shop",
IF(Contact.SKP_STDO_YR_WEB__c >= 1, "Studio", NULL)
)
)
Michael TweedieMichael Tweedie 
Hi,

I just did a windows update, and now when I open my SF the "tasks" tab is missing from my menu bar. It is also missing on the drop-down of additional menu items. 

Please help. 
Best Answer chosen by Michael Tweedie
Seyran MammadovSeyran Mammadov
Michael, you don't suck, it's okay, we'll figure it out.

Can you try switching from Pardot app to something else (like Sales)?

Go here and type Sales:

User-added image

Availability of tabs depends on Apps. Maybe your Pardot app doesn't have Tasks tab.
Cody IngramCody Ingram 

We are ammending our val rule that makes payment notes required in order to move this opp to "contract signed". We need the val rule to exclude stages contract signed and closed won. Here is the val rule I have 

 

 

AND(
NOT(ISBLANK(TEXT(Payment_Plan__c))),
ISBLANK(Payment_Notes__c ),

OR(
TEXT(StageName) <> "Contract Signed",
TEXT(StageName) <> "Closed Won"))

 

When I read through this rule it makes sense to me and it should exclude those two stages if payment notes is blank but its still firing on those two stages. We have checked to make sure that its the val rue throwing the error and not another val rule invalidating the field. Also record would not fit val rule criteria after record save. 

Any help would be greatly appreciate thank you!

Best Answer chosen by Cody Ingram
Usman AliUsman Ali
Hi Cody,

Try this formula.
AND
(
	NOT(ISBLANK(TEXT(Payment_Plan__c))),
	ISBLANK(Payment_Notes__c ),
	TEXT(StageName) <> "Contract Signed",
	TEXT(StageName) <> "Closed Won"
)

 
Best Answer chosen by Alma Bartolo
Usman AliUsman Ali
Can you please clear your browser's cache? and if you are in lightning then try to switch into classic and then try again.
Best Answer chosen by brindha y
Usman AliUsman Ali
Your code should look like this..
public class StringArrayTest 
{
    //Public Method
    public static List<string> generateStringArray(Integer n)
    {
        List<string> StringArray = new List<string>();
        for(Integer i=0; i<n; i++)
        {
            StringArray.add('Test ' +i);
            System.debug (StringArray[i]);
        }
            return StringArray;  
     }
}