Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

New answers tagged

0

The YEAR() function only accepts one parameter, that is being the date. So instead of using YEAR(2019,08,01), you should first create a DATE() and then take the year out of it. For example: YEAR(DATE(2019,08,01)) Which does not make any sense if you are hardcoding the date, instead you can just use 2019 instead.


1

Probably the most common issue with formula syntax is mismatched parenthesis, or missing commas. Being rigorous with the formatting (even though it won't appear formatted in Salesforce, until you go to edit the formula, that is) can really help make errors more apparent. Consistency and keeping each line fairly short/self-contained are key here. Applying ...


0

Here is my attempt at your requirement with both a verbose explanation and a minified version: IF ( OR ( //First Scenario Where Sales Type is Open Order and TODAY's date is greater than Scheduled Ship Date AND ( TODAY() > Scheduled_Ship_Date__c, Line_Status__c = 'OPEN' ), //Second ...


0

EDITED 11/18/19 10:15 am PST That just means it is not being resolved as it was in the initial field due to the insertion of IF and BLANKVALUE. At this point it might be worth specifying duplicate logic to try and get the calculation done. My next step would be to have the IF statement as the outtermost element and specify everything for each outcome. This ...


0

I just used Profile.Name = "System Administrator" instead of $profile. it works fine for me


2

$Profile is the global variable for the profile of the user that is currently logged in. It allows you to to customize formulas to the profile of the user looking at the field. See: Salesforce global variable documentation for more information. You see the formula return true on every user record because you are a system administrator, and therefore your ...


0

According to documentation about "Using Date, Date/Time, and Time Values in Formulas" : Date, Date/Time, and Time fields are formatted in the user’s locale when viewed in reports and record detail pages. So if you create a formula field of type Date and reference the Invoice Date, this will normally display the date as per logged in user's locale. ...


0

You cannot get value of the picklist field directly, you need to convert it into text first. Below code should work for you. if( TEXT(status__c) == 'Yes', IMAGE("/img/samples/flag_green.gif", "Status Flag"), IMAGE("/img/samples/flag_red.gif", "Status Flag") )


2

I don't know whay it's not working as-is - we'd need to see the original field to confirm. But I propose this alternative approach: VALUE(LEFT(TEXT(Cash_Flow_Repayment_Sources__c), FIND("-",TEXT(Cash_Flow_Repayment_Sources__c))-1)) This finds the first dash character in the value of the selected picklist item, takes the characters to the left of it, and ...


0

Please check the formula above: IF( NOT( ISBLANK(Field1__c) ), Field1__c, IF( NOT( ISBLANK(Field2__c) ), Field2__c, IF( NOT( ISBLANK(Field3__c) ), Field3__c, null ) ) )


Top 50 recent answers are included