Questions tagged [formula-field]

A formula field is a field that automatically calculates its value from other fields, expressions, or values.

Filter by
Sorted by
Tagged with
0 votes
1 answer
26 views

Where is the official documentation for how the "$Permission" field type functions in Formula Fields?

You can create Formula Fields that reference values from "$Permission". How are those values created? What is being referenced? Providing the official documentation and additional ...
Tyler Zika's user avatar
  • 2,818
0 votes
1 answer
60 views

profile.name = "System Adminstrator" in formula field is not working

I am using profile.name = "System Adminstrator" in formula field to set the checkbox true but it's not working. I have tried $profile.name = "System Adminstrator" also but still ...
prakhar's user avatar
1 vote
1 answer
34 views

IF Statement I want the value to show as a Percent

I have two fields in Salesforce. One is a currency and one is a percentage field. I have a third formula (text) field that I want to show the value of the currency or the percentage based on an IF ...
Kate Colson's user avatar
0 votes
1 answer
53 views

Cannot create formula using lookup object?

I just modified The standard salesforce object Product2 To include a custom property - a checkbox. I want to map this property out to the cart it belongs to. the way a product is associated to to a ...
Carlton Banks's user avatar
0 votes
2 answers
54 views

Formula to populate a field if closed date is blank

I am trying to calculate number of days between case created day to today and fill that values in Field name Created Days to today. But it should have null value or Blank if the case has Closed date ...
Aswin Gunasekaran's user avatar
-1 votes
2 answers
41 views

Salesforce formula for multiple picklist values

I am trying to write a formula where if Field- 'Status' contains picklist value as 'New','In-progress' or 'Escalated' then I want to make Field - Urgency to 'False'. Can anyone please help me I tried ...
Aswini B's user avatar
0 votes
1 answer
40 views

How to create a Roll up summary field, activity on leads

I am trying to create a roll up summary field on the lead object that looks up to activity object and counts the number of activities that are not closed. But for some reasons it cannot do that, ...
Tomi's user avatar
  • 11
1 vote
1 answer
46 views

Formula Field with Custom Metadata Type that is created in test method

I have a test method that needs to assert the creation of a document, the creation of such document is blocked by the evaluation of a (Boolean) Formula Field that depends on a Custom Metadata Type ...
djpeluca's user avatar
  • 187
-3 votes
0 answers
44 views

Formula for displaying first of the month following a date

I'm trying to create a formula that will calculate the first of the month following the start date of an employee. The field for the first of the month is the following: fHCM2__Start_Date__c So for ...
A Long's user avatar
  • 11
-2 votes
0 answers
45 views

Help adjusting a formula field to stop a date counter

From a team member: "Can we adjust the formula field to stop the clock on the age of the invoice once its paid? I just edit it to subtract the sent from paid to get the delta on the formula field?...
Jesse Lebhar's user avatar
0 votes
1 answer
29 views

I need help building a date timer that relates between objects

This was my guidance for this task: Problem: We have Production records and Requirement (RFI) records. We need to be able to track the 90 Days from an initial RFI Date regardless of the number of RFIs ...
Jesse Lebhar's user avatar
2 votes
1 answer
48 views

CMDT references in a formula field breaks rollups?

I have a formula field that is rolled up in a parent object. The field is of this form i.e. constants for the case values: <formula>IF ( ISPICKVAL(Status__c , &quot;...
Keith C's user avatar
  • 135k
-1 votes
2 answers
57 views

Multi Picklist and number fields

I'm trying to create a new formula field that gives results as a text by concatenating few fields like multipicklist fields and text fields and numbers fields. But i have been receiving an error when ...
Dug's user avatar
  • 1
0 votes
1 answer
50 views

Help with Contact Birthday Formula Field

I'm creating a formula field that identifies contacts with birthdays in the current week. I came up with this, but I'm getting this Syntax error: Error: Incorrect argument type for function '...
Vaxy Valmyr's user avatar
-2 votes
1 answer
48 views

What formula do I use to divide the total opportunity amount over the program duration period showing the projected monthly revenue?

Closed won opportunity amount = $30k Est start date field = 10/1/2023 Est end date field = 12/31/2023 Looking to display something similar to the below. October monthly revenue = $10k November monthly ...
Kristin Kennedy's user avatar
0 votes
0 answers
41 views

UserServicePresence Object : Not able to access UserId field in formula?

REQUIREMENTS : I need to create a field on UserServicePresence object, to check if the current user is the user referenced in UserServicePresence records. I need this field to be used in reports, to ...
Jul0s's user avatar
  • 11
-1 votes
1 answer
51 views

Need to calculate Elapsed time between 2 Date time fields excluding weekends

I have the formula which calculates the number of hours elapsed between 2 DateTime fields excluding the weekends. Using this formula field in another calculation is giving Compile error. Is there ...
Amulya's user avatar
  • 13
-2 votes
1 answer
90 views

Salesforce - How to compare two Date/Time fields?

Good afternoon! I am working on a formula field that will compare two DATE/TIME fields and return the larger of the two dates. My current formula is drafted below, but so far, the field I am trying to ...
Conner Brown's user avatar
-1 votes
1 answer
31 views

Check the checkbox only for first created record

I have requirement like : One custom object (Issue) it is child object of CASE object and it is has checkbox field (primary issue). It has to be checked only for first record created from case and for ...
Arjun's user avatar
  • 3
-2 votes
1 answer
33 views

How keep these 2 logics in one IF statement formula?

Net Amount part works as expected but CPq level max does not work.How I can add or/ add functions to this formula? IF( SBQQ__NetAmount__c <= 7500, " Approval Required ", IF( ...
Ulvia J's user avatar
  • 15
-2 votes
1 answer
23 views

Sort list/kanban view by integer formula field

I have a requirement in which I will need to sort a list/kanban view by an integer formula field. Is this possible? I've checked the documentantion and found nothing related to this topic. Thanks in ...
molinet's user avatar
  • 867
0 votes
1 answer
63 views

I need to create / automatically display an age rounded to the nearest half year. My formula is only giving me to the year

I need to display a formula field that shows the age rounded to the nearest half year. For example: if the DOB is 01.01.2012 then that persons age would be 11.5. The formula I'm using only displays 11....
jessilundquist's user avatar
-2 votes
1 answer
69 views

Treating Blanks as Zeros within a Salesforce formula

I have this formula created to work out the number of days between created date and the closed date, but also this takes away the time which the opportunity was sat with a broker. However, I have ...
Jason Appleton's user avatar
-2 votes
1 answer
128 views

Phone Number Formating using Formula field

I'm getting Error: Syntax error. Missing ')' on the following formula basically want to remove spaces and + in the beginning I want to format the phone as per below examples 0469 407 546 to ...
Mohammed Imran's user avatar
0 votes
0 answers
43 views

What mechanism can I use to calculate/display text output based on (possibly multiple) related child objects on custom object

Please forgive me if there's a related post, but I couldn't find one. As the title suggests, I have a custom object (A) that will be the parent side of a lookup relationship and I am looking for a way ...
Max's user avatar
  • 1
-2 votes
2 answers
43 views

creating a commission formula for custom object

I am new to Salesforce and hopefully I'm asking the right question. I have created a custom picklist under my Accounts object to determine what tier my customer has agreed upon. Tier 1 would be a ...
nrw2631's user avatar
0 votes
2 answers
187 views

Calculate the Case age based on changed status

I need to create a formula field(s) to show case age as below: Expected outcome : Case Age before Case Closure: Case Creation Date and Time - Current Date and Time = 4 hours Case Age after Case ...
B Hassine Qais's user avatar
0 votes
1 answer
42 views

Field formula for customer health score

I'm wondering why this formula isn't working and was hoping for some help, as I think I'm missing something small. I'm trying to translate a numeric health score into colors based on ranges in a ...
sarah's user avatar
  • 1
-1 votes
1 answer
63 views

Formula to display time difference in minutes between 2 fields while excluding weekends

I'm facing an issue with a formula, and I could use some support. I have a requirement to calculate the time difference in minutes between two datetime fields, Email_First_Reply_Date_Time__c and ...
Carmen Groza's user avatar
-1 votes
2 answers
136 views

Formula to Calculate 5 working days from created date, where created date is DateTime data type

I found a formula online about returning a date data type for 5 working days after the case created date, but I noticed the "created date" data type is set in DateTime. I am thrown through a ...
Jasmine G's user avatar
-2 votes
1 answer
57 views

How to write an ISPICKVAL formula

I have one picklist field that contains "Signed", "sent" and "received". I would like to create a text formula field that displays "in progress" if "Signed&...
gcf2609's user avatar
0 votes
0 answers
27 views

Not seeing the object I want for the c level of a new custom report type

I cannot figure this out for the life of me. We have pretty much all custom objects (most are via a managed package from the exchange app ADvendio). I'm looking to simplify the way we process ...
Courtney's user avatar
0 votes
1 answer
43 views

How to test two conditions in formula field IF

So I'm stuck on the logic here this was my original code and it worked but I was also trying to add a condition that if TODAY()-LLC_BI__Covenant2__c.LLC_BI__Next_Evaluation_Date__c) > 0 is true ...
Albert Chen's user avatar
0 votes
0 answers
72 views

recalculateFormulas() returns "System.HandledException: Script-thrown exception (System Code)" when Address has State selected

In trigger action BeforeInsert Quote, recalculateFormulas() returns this error "System.HandledException: Script-thrown exception (System Code)". It happens only when State is selected in ...
Jacinth's user avatar
0 votes
2 answers
46 views

Formula field for in-year revenue, needs a tweak

The current formula is: ((( DATE(2023,11,30)- ( Production_Live_Date__c )+ 30.43685))/ 30.43685)* List_price_MRR__c Effectively calculates the in-year revenue forecast based on the go-live date in ...
Ft2711's user avatar
  • 17
0 votes
0 answers
21 views

Latest Activity on Account if Assigned to user is not User B

I'm trying to see if it's possible to create something that will show me the most recent activity on the Account. Currently we are using a custom field that references the LastActivityDate field and ...
Hulk Buster's user avatar
-1 votes
1 answer
47 views

How to write a Formula to have a checkbox checked by default and if the case is reopened, uncheck the box to track First Contact Resolution?

For example, if a customer comes in and a case is created, the FCR (First Contact Resolution) Checkbox is already checked by default, then if the Case has a status of Resolved and it changes, meaning ...
TStorm's user avatar
  • 1
0 votes
1 answer
103 views

Validation rule not working for Decimal values

I've created Validation rule for Sales Price should be greater than market price on opportunity line item. But it seems this validation rule is not working for decimal values. Below is simple ...
whoisnilu's user avatar
  • 115
0 votes
1 answer
35 views

Nested IF THEN Statement

I am trying to use nested IF statements to get a field to populate a country. It seems like no matter what I try I get the same result. Can you help me understand this structure? The reason for ...
Aereisdin's user avatar
0 votes
1 answer
96 views

Error: Incorrect parameter type for TEXT. Expected Number, Date, DateTime, received Picklist

I have a picklist custom field, let's call it Class__c of Unit custom object. I want to assign a default value to it. Default value is current user's Unit__c value. User's unit is also a picklist ...
salesforce Uz's user avatar
-1 votes
1 answer
166 views

Have created a Custom Formula Field Country which should be able to fetch Country Name from the Address standard field on Lead Object

Hello SFDC Experts and Community People, Thanks for all your help so far to help me with the JS code which was inserted in Web2Lead HTML form code to obtain Lead's country info. However as the ...
Aritra Dasgupta's user avatar
0 votes
0 answers
50 views

CASESAFEID(lookupId) not returning 18char id in Lightning Email Template

I have a Lightning Email Template in which I'm using merge fields of an object, where one of them is a lookup record id (Application__c), and need the 18char version of the ID. I've created a formula ...
Irene's user avatar
  • 1,753
0 votes
0 answers
102 views

I have a formula component to assign Regions depending on country input of a lead. However, the formula is too long. Is there a workaround?

The requirement is to automate choosing regions, subregions, and theaters with the country input. We want this for reporting leads based on regions which is not offered by Territory Management feature ...
Emir's user avatar
  • 11
0 votes
0 answers
84 views

Fetching hour value from a time field in current user's timezone

By using the below formula I'm trying to lock the record from editing. Lock_Date_Time__c - Field which is capturing the date time when the record was locked. AND( / ******* If the time diff is ...
HG_'s user avatar
  • 125
-1 votes
1 answer
50 views

Extract a Contact's Mailing Country or User's Mailing Country on Case object

I am currently trying to extract either a Contact's mailing country or the User's mailing country onto the Case object. FYI : All our users are stored as contacts too. I used a formula field with ...
AlizehS's user avatar
  • 17
0 votes
3 answers
113 views

Formula field subtraction returning 0.01 instead of 0 with Currency fields

I have two fields on Opportunity: FieldA and FieldB. FieldA is a formula field of type Currency with 2 decimal places. FieldB is a currency field also with two decimal places. Let's assume the value ...
Abhishek Kumar's user avatar
0 votes
2 answers
180 views

Display qr code image from formula field in LWC

I have this formula field that shows the generated qr code on the record detail page: IMAGE('https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://www.yahoo.com' ,'QR code to open ...
mackmama's user avatar
  • 669
0 votes
1 answer
44 views

Calculate Next Audit Date between Audit Frequency and Last Audit Date field for Vendor Object

I am trying to calculate the Next Audit Year based on Audit Frequency field(which is a picklist with the following values: Annually, Every 2 years and Every 5 years) and the Last Audit Date which is a ...
Chantel's user avatar
-1 votes
2 answers
32 views

Formula field for Contact's organisation

I have a requirement to Create a formula field “Organisation Phone” in contact object which should be displaying [Phone] field from Contact’s Organisation. The formula I have is below: IF( NOT(ISBLANK(...
zsk_1's user avatar
  • 47
1 vote
0 answers
26 views

Custom Notification is adding decimal points to a Salesforce field when posting in Slack

We have a notification built in Salesforce Notification Builder that is sent to a slack channel whenever an Opportunity is Closed. Part of the notification displays a number field from the Opportunity....
DrElyk's user avatar
  • 33

1
2 3 4 5
26