Questions tagged [formula-field]

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

202 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
12
votes
3answers
2k views

Create a currency formula field with no decimal places for Standard Page Layout

We have the following challenge with currency fields: Scenario: On child record(s) (in a multi-currency org) we have pricing information which is stored as a currency value with 5 decimal numbers in ...
9
votes
2answers
267 views

Field filter does not Work for Text Formula field used in SOQL

I have a simple SOQL query on Account which has a field Full_Address__c which is joint of Billing Street, City Zip. When I use this field as a filter it doesn't return the records: Example: String ...
5
votes
0answers
195 views

Formula.recalculateFormulas producing gack

Winter 20 release is in live, so I wanted to use this glorious feature Formula.recalculateFormulas Thus I tried the below block of code: Opportunity opp = new Opportunity(Purchase_Price__c=2000 , ...
5
votes
1answer
868 views

Partner Account ID-Lead Object

There is Partner Account field on lead object. Salesforce help says, Description:ID of the partner account for the partner user that owns this lead. Available only if Partner Relationship Management ...
4
votes
0answers
2k views

Can Lightning SLDS icons be displayed in formula field without using static resources?

I want to display an icon in a formula field based on the value in another checkbox field on my object. I would like to use the standard Lightning SLDS icons here. I've found a way to achieve this ...
4
votes
1answer
1k views

recalculateFormulas() causing UnexpectedException: Unable to create/update fields: IsDeleted

When I update my custom Record__c a trigger runs, and it calls recalculateFormulas() on the record. This results in the following error: System.UnexpectedException: Unable to create/update fields: ...
3
votes
1answer
612 views

How to implement Formula field for FullPhotoUrl in User object?

I need to create formula field that populate full URL of FullPhotoUrl in User object.Currently the value of FullPhotoURL is'/profilephoto/729n00000004DSL/F' where I cannot use for my third party ...
3
votes
0answers
1k views

How to reduce formula size. Error : Compiled formula is too big to execute

I am getting error when i added new status to my application. the error is Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5235 characters). Maximum ...
2
votes
0answers
31 views

Formula field's actual formula

IS there any way to get what a configured formula fields actual formula is? Strange ask, I know, but we dont use visual force for our front end. We build it ourselves with JS. The issue then is ...
2
votes
0answers
304 views

How to replace long formula with Process Builder or Workflow?

I am getting this error: Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,329 characters). Maximum size is 5,000 characters (Related field: ...
2
votes
0answers
1k views

Formula Field or Process Builder Firing which happens first

I have a scenario when my record is created initially there is a formula field which is a checkbox(false). In the middle of logic i change my record values and so the formula field would become true. ...
2
votes
2answers
314 views

LastActivity on Case Object

I need to populate a date on the case object that has the Last Activity date recorded. I tried to make a date formula on the case object, but cannot find the LastActivity API to pull it through. Is ...
2
votes
1answer
798 views

Wrong Business Hours Calculation (Formula)

I have a formula field that calculates business hours (M- F > 09:00 AM to 5:00 PM- 8 hours) between two date time fields. i actually used exactly same formula that sf helps provided. https://...
2
votes
0answers
70 views

Formula (ACTIVITY Custom Field) based on CONTRACT picklist

In reference to a previous question that was asked (Formula based on picklist), I am trying to create an Activity Custom Formula Field that returns a text value if the field value in Contracts object ...
2
votes
1answer
140 views

Ability to sort a concatenated formula field by numerical value

I have a formula field that concatenates values from various fields within a custom object. Each of these items has a simple numerical value. I've created this formula field to summarize certain items ...
2
votes
1answer
364 views

Is there anyway to prepopulate formula fields before saving?

I have a problem related to the UI in SalesForce because the input of other text number fields is based on the formula field results. IF a user input field Amount_To_Be_Paid is based on Formula field ...
2
votes
0answers
41 views

Calculate how long a contact is inactive

I have had a mental block. Aim- calculate how long a contact has been inactive This is so simple ,but for the life of me I can't think how to do it. Field :Inactive Data type : checkbox ...
2
votes
0answers
336 views

Comparing a field value to a large list of potential values

I'm looking for a way to compare the value of a field to a list of potential values (static, not from another field) and then put the result (True if it's on the list, False if it is not). The actual ...
2
votes
0answers
83 views

Formula field result is different on object vs in a report

I have some text formulas on an object called Student Placement. They compare and explain the difference between Fall and Spring GPAs (which are numeric formula fields). If either or both of the GPAs ...
2
votes
0answers
180 views

thumbnail type images?

I'm trying to integrate amazon S3 with SalesForce, I did it with the toolkit. When it says to upload image, it shows the image to a bigger size which I do not want. How do i resize and have thumbnails?...
2
votes
0answers
1k views

Using a Lookup Relationship in a Formula Field

I want to update a field on the the account object based on a field being updated on the contact object, in this case a date / time field. So far, I have setup a lookup relaionship field on the ...
2
votes
0answers
697 views

Formulae field is not showing correct value in debug logs as expected.

I have create a formula field with decimal places 1. Formula field return type is currency. If i see its value by querying the data base using developer console i get 15000 but if i put a debug log ...
1
vote
1answer
33 views

Formula field - Hyperlink to record page (SF and Community)

I have a formula field that displays a text and has a link to record page, like this: HYPERLINK('/'+ Id , Name__c) The problem is, this has to work inside Salesforce but also in the community, and ...
1
vote
0answers
27 views

FORMULA FIELD DATE FIELD WORKING DAYS

I have 2 date fields which calculates the number of working days of 2 date fields. here's my forula: ((DATEVALUE( Application_Received_Date__c ) - (DATEVALUE( Date_Test_Field__c )))) - (CASE(MOD( ...
1
vote
1answer
21 views

Process flow to trigger notification when user first logs in to community?

I'm trying to create a trigger from a process builder flow which creates a push notification when the user first logs in to the community. I start with the User object - when a record is created or ...
1
vote
0answers
30 views

Does process Builder Scheduled Action recalculates the scheduled time for formula field?

I have custom solution to replace standard Contract expiration Notice (because of need to change email template and different values for days). So I created custom picklist field "Owner Expiration ...
1
vote
0answers
17 views

Is Salesforce Advanced Formula Example for Business Days Incorrect?

Throughout the year we have been using the following formula field from Salesforce Advanced Sample Formula to calculate the number of business days: This is recommended on the Salesforce Website ...
1
vote
1answer
91 views

Change a formula field and get Data Uniqueness Violation - The proposed data changes would violate a uniqueness constraint

Given Existing custom field Asset.SerialNumber (OOTB - Text) New custom field Asset.SerialNumber_bis__c (Text255, External Id non-unique, deterministic encrypted case insensitive) Existing custom ...
1
vote
1answer
49 views

Formula field help, please

I have 3 text formula fields: Field 1, Field 2 and Field 3. I want to create Field 4 formula field that checks if there is value in any of those 3 fields and give the value to Field 4. I have tried: ...
1
vote
1answer
72 views

Validation Rule not firing after new records is created, only existing

Validation Rule is only working for existing records. When new records are created and edited the VR is not firing. Multi-Selection picklist, there are 2 choices: Project manager (default) ...
1
vote
2answers
757 views

The formula expression is invalid: Syntax error. Missing ')' Help Please

When trying to save the below formula I get this error: The formula expression is invalid: Syntax error. Missing ')' Help Please Why do I get this error? How can I fix it? AND( IF ( ...
1
vote
0answers
20 views

Can some explain below formula of excluding weekends counting

Can some explain below formula of excluding weekends counting, I want the explanation I'm not able to understand the below formula. The formula is : CASE(MOD( ActivityDate - DATE(1985,6,24),7), ...
1
vote
1answer
1k views

IF statements in formula field or process builder

I need a formula field that essentially has two different formulas depending on which product is selected on the Opp Product. Both products and formulas will be needed, so it's not really an IF/ELSE ...
1
vote
0answers
107 views

How to display Day Counts Timer on Case Object?

I have a requirement where I want to display no of days when Case is opened. Days should count only when Case Status is 'New','In Progress' or escalated. IF the case status is Pending with Business ...
1
vote
0answers
186 views

Formula field: Does current time zone have DST?

I've tossed together some creative formula fields for a client who has some special requirements around Canadian time zones. They have a number of sites at which they need to book appointments, and ...
1
vote
1answer
731 views

Alternative of Rollup Summary field on cross object formula field

I have a formula field with return type 'currency' and it uses a custom setting field in formula Formula is something like this :- IF(AND(Invoice_Date__c < $Setup.New_Cust_Sett__c.date_field__c ...
1
vote
1answer
59 views

Updating of many records using Formula field meets any governor limits?

I am Trying to create a report on Object__c. So I am trying to use user custom field(projectName__c) value in custom object field(projectName__c) in filter in Reports. For that, I got a suggestion to ...
1
vote
0answers
27 views

How to show Old values of edited fields on update

I am sending the record for approval if any of the user edits, My requirement is i need to show the Old values which are edited to the approver, I tried using process builder its not happening, ...
1
vote
0answers
913 views

Mapping Opportunity Product to Order Product object

I'm spinning up Contracts and Orders within my organization and need to map fields from my Opportunities over to their place in the Contract/Order/Order Products objects. I've successfully pulled ...
1
vote
0answers
92 views

Formula Field On a Case object

I have a case object and two other objects associated to it(associates and stores) I want to design a formula field, such that when an associate ldapid field gets the input, then the store number ...
1
vote
1answer
83 views

Certain profile user shouldn't be allowed to create record of custom object thru 'NEW' button on HOME page

I have a requirement for a custom Object, when user with certain profile (For example Sales) will click on "New" BUTTON (mentioned below is the screenshot of the same) then it should display error ...
1
vote
1answer
44 views

Report Grouping by Date

I'm relatively new to SF but gaining steam quickly. I've got Opportunities that include a contract start date and contact end date and I am trying to create a report that summarizes who we have ...
1
vote
1answer
177 views

Format and multiply a number without rounding

So I have %%=FormatCurrency( Multiply(@365,339.00,1.5),"en-US",0,"$" )=%% Which returns $548,009 The issue with this is that it's rounded the .50 so it now ends in 9 not 8. I've been working on ...
1
vote
3answers
335 views

Formula on a Lookup field shows wrong results

I have a Lookup relationship on Opportunity to an object named PAF. PAF has a formula field named "Result" with the this code: IF(T_Amount__c < 385,"FAIL","PASS"). I want to show this result on ...
1
vote
2answers
384 views

Format TEXT(NOW()) in Workflow Field Update

I have one Field Update and I am Populating todays date.. So I used TEXT(NOW()) but i am getting the result as(2016-08-10 11:46:33Z), I need the result as 2016-08-10 date only and if possible (08/1/...
1
vote
3answers
259 views

Workflow Is not working for existing records

I have created a workflow rule(Email to contact on his/her birthday).I have used this logic____If(Birthdate=today(),True,False)____ it is working fine and sending an email if I am inserting a record ...
1
vote
0answers
66 views

Custom setting (Hierarchical) is not working for formula field.

I have a Formula field 'Alert' on my CASE object that should display an image (Warning) when 'Year/Model' field on CASE object is equal to 5 particular values (2001/Accord, 2002/Accord, 2001/CIVIC, ...
1
vote
1answer
40 views

Formula for examining the last 3 records on a child object

I have two objects. Work (Master Object) Field: Work Done Tasks (child object) Field: Work Done I want to create a formula field on the master record Work so that when the last 3 records of ...
1
vote
0answers
80 views

How to populate values in vf page from formula field

I have created a formula field in lead object with hyperlink which redirects to a page. I need to send lead last name and email to that page to get pre-filled in that. Formula field is IF( AND( ...
1
vote
2answers
2k views

Calculate Business days and Calendar Days in Formula field

We have a custom Service Request object and have following fields Date/time open Date/time closed Expected Resolution date SLA Type SLA Type can be calendar day or Business day.So we would like ...

1
2 3 4 5