Questions tagged [formula-field]
A formula field is a field that automatically calculates its value from other fields, expressions, or values.
265
questions with no upvoted or accepted answers
10
votes
2
answers
849
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 ...
9
votes
0
answers
608
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 , ...
6
votes
0
answers
4k
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
1
answer
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
0
answers
98
views
How can I tell if a field is a non-custom formula field in the REST API?
We have an integration that allows users to specify criteria to listen for on arbitrary object types in Salesforce. The user specifies the object type they want to listen to updates on and then they ...
3
votes
0
answers
2k
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
0
answers
471
views
Filtering an Action button on a record based on active User
I am trying to display a Create a Record button only if the user looking at the page is the same user in a related user field.
I currently have a formula checkbox field that is true if the active user ...
2
votes
0
answers
175
views
Unexpected behaviour in formula field (Type - Date)
I am not sure if below is bug in salesforce or is expected behaviour and would like to know reason for same.
If I create a formula field as below
Type - Date and formula only containing CreatedDate ...
2
votes
1
answer
1k
views
Error: Unsupported field type called "Text (Encrypted)
I was hoping to get some ideas on how can I go about doing this.
So I want to run a report that checks if one Encrypted field in one of our objects is empty but we cant use encrypted fields in any of ...
2
votes
0
answers
58
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
0
answers
449
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
0
answers
2k
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
2
answers
604
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
0
answers
97
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
1
answer
244
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
0
answers
60
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
0
answers
438
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
0
answers
88
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
0
answers
192
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
0
answers
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
0
answers
1k
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
1
answer
240
views
Formula Field to calculate conversion rate of one stage over another stage in contact object in reports
My requirement is I have a custom picklist field in the Contact object name stage, like MQL(Mkt qualified Leads and DQ(Disqualified leads) SQL(Sales Qualified Leads) Now I would like to calculate and ...
1
vote
1
answer
177
views
How do I populate a formula text field for an HTML link that would include multiple fields from the same object?
I have dynamic "add to google calendar" links configured for Visualforce templates, but would like to be able to populate the links on our SF event object as a field so users without ...
1
vote
0
answers
65
views
How to set a text block of more than 3.9k characters based on a condition in a formula field?
I have a requirement where I need to create a number of formula fields that will contain one or more paragraphs of legal verbiage based on certain conditions. But since formula fields only take 3.9k ...
1
vote
0
answers
343
views
Multiple If condition inside classic HTML Email template
In classic email template I am trying to put multiple if condition for two different fields and that two fields are formula fields
The fields names are
X1Annual_Meeting__c
X1Proxy_Other__c
if ...
1
vote
1
answer
126
views
Relationship API name for Task to Opportunity
I am trying to create a hyperlink that will take User from the Task back to Opportunity through a custom object (Appointment__c_).
Task -> Appointment__c -> Opportunity (API Name ...
1
vote
0
answers
29
views
Salesforce calculating different formula size in different orgs
We have a formula field having the following formula
IF( IsClosed,
CASE(MOD(Opened_Date__c - DATE(1985,6,24),7),
0 , CASE( MOD(Closed_Date__c - Opened_Date__c,7),1,2,2,3,3,4,4,5,5,5,6,5,1),
1 , CASE( ...
1
vote
1
answer
946
views
How to get Formula Description for LWC
The "MailTempRenewalHosyuStart__c" in Contract object is formula of text.
I wrote as below.
"★Detail★
"&BR()
&BR()
&( Field4__r.Name) &BR()
&TEXT( C__Contact__r....
1
vote
1
answer
368
views
Can I adjust Workflow Rule to only trigger email alert when formula field value changes not any time its updated to same value?
This is My workflow rule
AND(
ISCHANGED( Number_c ),
ISPICKVAL( StageName , 'Closed Won')
)
The problem I have - currently I get an Email alert even if the field has the exact same value as ...
1
vote
0
answers
36
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
0
answers
256
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
1
answer
61
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
1
answer
658
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
0
answers
94
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
0
answers
263
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
0
answers
203
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
1
answer
1k
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
1
answer
118
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
0
answers
38
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
0
answers
1k
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
0
answers
130
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
1
answer
541
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
1
answer
144
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
1
answer
361
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
3
answers
457
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
0
answers
80
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
1
answer
65
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
0
answers
90
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
2
answers
3k
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
vote
2
answers
84
views
salesforce formula field
I have a custom field completed date .this field captures all the field value when any task status changed to completed.
Totally i have 4 tasks , in which i want difference between two tasks in a ...