Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
28 views

formula field to retun a specific value

I have below formula field now I need to update this formula as if one of the fields is blank then it should return 1 and if 2 fields are blank then it should return 2 and so on for 3, 4 and 5. IF( ...
2
votes
1answer
17 views

Restrict Auto case-number field to specific record type

I've a custom auto case-number field for one of my case record type (Quality Report). Every time a new case is created, the auto case number is generated (ex: QR-1287). However, the auto number field ...
0
votes
1answer
14 views

HYPERLINK function in a formula field returns different results

Background I have a custom object Recipient__c with a Lookup relationship to Contact. Also it have another Master-Detail relation to another custom object SomeObject__c. The Name field for this ...
0
votes
1answer
33 views

Someone please help me compress this formula - Compiled formula exceeds 5000

Someone please help me compress this formula - Compiled formula exceeds 5000 IF(Today()<Date(Year(Today()),7,1), Case((Year(Pledge_Submitted_Date__c)+YearsToGo__c) -Year(Today()), 4, ...
0
votes
0answers
33 views

MAKE LIST CONTAIN 6 DATE FORMULA FIELD

I have list of Plan Date and Reminder Date (14 days before Plan Date). But, both of the fields stop counting after December 2018. I use Date Formula Field on Reminder Date. How can I make it ...
0
votes
1answer
48 views

How Can I Get A Substring From A Long Text Area Field?

I have a Description field of type Long Text Area. I'm trying to get the first few lines to display. 1. I tried creating a formula field LEFT(Description, 500) I get Error: You referenced an ...
1
vote
1answer
87 views

Formula Field - Case Function

Am trying to build a formula field with multiple IF conditions, so decided to go with Case function, below is the return statement based on the picklist value 0 Member 2 Member 3 Member 22 Only a ...
0
votes
1answer
21 views

We have to update a field value from other object field value based on a certain condition via formula field or not

We have 2-objects called A,B and A is the parent and B is child. We need to update X-field value(Date data type) on B object with A object's Y-field value(Date) whenever A-object's STATUS changes to ...
3
votes
1answer
32 views

Process Builder can't access Platform Event parameters in formula?

I created a Platform Event, and now I'm building a process that is triggered by the Platform Event. The Platform Event parameters either contain a ContactId or a LeadId, but not both. The process I'm ...
0
votes
0answers
24 views

Formula field is not working

I have a Formula Field Status_Image_Url__c in Case Object . I am confused why everytime I update the status of my Case from "Investigating" to "Submitted to Engineering" the image is not ...
2
votes
0answers
41 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 ...
5
votes
1answer
101 views

SOQL returning incorrect value

This is throwing me for a loop. I have a custom field on user, Backend_User__c. The formula is pretty simple: IF( OR( Profile.Name = "API Only", Profile.Name = "Boldchat API Only", Profile....
0
votes
1answer
29 views

Reducing Size of Case Statement

CASE( RegisteringCountry ,"Argentina", "India", "Australia", "India", "Bangladesh", "Singapore", "Belgium", "India", "Bhutan", "Singapore", "Brunei Darussalam","Singapore", "Brazil", "India", "...
0
votes
1answer
33 views

How to create logic to lookup for custom case number on case object? [closed]

I have a Visualforce page which is used to create customer service related cases on the case object. We have a custom case number value for each case created (QR-1001, QR-1002 .....). For certain ...
2
votes
2answers
64 views

Formula field to get records created this week on activities

I have a requirement where a checkbox is to be checked if a record is created by a specific profile this week on activity. So, I got the following formula: IF(CreatedBy.Profile.Name = "Territory ...
-1
votes
0answers
28 views

I have a csv file as a static resource and I want the ability for the users to download the file.

I have uploaded a csv file as a static resource. I want to create a custom formula field where I can refer the csv file as a link. So when the user clicks on the link he should have an ability to ...
0
votes
1answer
29 views

First error: common.exception.SfdcSqlException: ORA-00920: invalid relational operator

I have created formula field named "Second Audit Required" as shown below : IF(And(AND(Text(Status__c)='Closed',TEXT(ServiceStep__c)='Treatment',Order__r.Account_Name__r.Account_Types__r.Name='...
0
votes
3answers
53 views

Merge Date & Time field in to datetime field using formula field

We have to separate fields to pick appointment date & appointment time in Custom object. Now we have to filter out appointments between two dates (w/ time), so I need to compare appointment date &...
3
votes
1answer
45 views

recalculateFormulas() throws an unexpectedException. Unable to create/update fields

I have a function in Apex that sets a few fields on my custom object and that also calls the recalculateFormulas() function on the object. I call my function from Salesforce through a custom button. ...
0
votes
1answer
23 views

Picklist values in a formula on a validation rule (along with text fields)

I have a validation rule on the contract object which doesn't allow a checkbox to be checked by users until they have completed the required fields. The issue is that some of these fields are picklist ...
0
votes
1answer
18 views

How do I access the Phone field (Event standard field) on a formula on Activity?

I'm trying to create a custom formula field on Activity that looks something like this: SUBSTITUTE(Phone, '-', '') However, the syntax checker says the Phone field simply doesn't exist, even though ...
0
votes
1answer
39 views

Calculate hours from two text fields

I have a custom object called Log. It has two fields : StartTime__c and Endtime__c. R1.StartTime__c = '05:58 am'; R1.EndTime__c = '11:54 pm'; The number of hours between StartTime__c and ...
4
votes
2answers
204 views

Why formula field can not tackle the following issue?

While preparing myself to the Developer 1 certification I met the following question: Universal Containers requires a Service Representatives to update all Cases at least once every three days. To ...
0
votes
0answers
16 views

formula field returning currency while changing the currency sign

Scenario I need to have a different currency symbol based on another field which can store the currency code or symbol. So like if I've field called Currency where the value is "EUR" so in formula ...
0
votes
0answers
18 views

How To Map A Custom Number Formula Field To A Custom Number Field?

I have set up Big Objects and I am trying to map a custom number formula field (which is advised by Salesforce to use as a "Workaround" to resolve the limitations on field types in big objects) to a ...
0
votes
0answers
43 views

Difference between two datetime fields giving negative values

I am using the below formula to calculate hours between two datetime fields.But total is coming as -16. What is the problem happening. Start_Date__c = 30/07/2018 06:59 End_Date__c = 30/07/2018 14:29 ...
0
votes
2answers
24 views

Can I stop a process if the field update values are the same or similar?

I have a process builder that creates a case when an Account name has been changed. My company builds software for hospitals, which fairly frequently change ownership and names. The case is to alert ...
0
votes
2answers
33 views

How to get formula field from invoice without update

I have made a counter for invoices for several offices. The current office to create an invoice is determined by a formulafield. How do I get this in my testclass I tried to query the invoice but it ...
0
votes
1answer
48 views

List View - display names as Last Name, First Name in Lightning

In classic, the Name field for Contacts in List View always displayed Last Name, First Name. In lightning, they seem to have switched this to first name last name. I would like to unswitch this. I ...
0
votes
1answer
15 views

Text formula field does not shows the full id of an custom object

I have a formula field called CandidateKey__c which can hold either an opportunity or account id. I have noticed that the CandidateKey__c is not showing the full Id of opportunity or Account objects. ...
0
votes
1answer
34 views

If statement based on created by profile name to show value is custom formula field

This new field will be called "Line item Total Test" on Opportunity Product. This Formula is not working- IF(CreatedBy.Profile.Name = "Standard User", TotalPrice), IF(CreatedBy.Profile.Name = "...
0
votes
0answers
23 views

Formula logical operators currency madness

Either there is something really wrong going on with SF or I'm going crazy. I have some fields: Total__c, Amount_Received__c, Amount_Refunded__c (Currency) Amount_Paid__c (Formula Currency) ...
0
votes
1answer
23 views

formula values are not getting in URL in Production

I created a custom button on custom object. Behavior= "Execute Javascript" Content Source="Onclick Javascript" I have written the following code in sandbox. It is working in Sandbox. But, In ...
0
votes
1answer
120 views

Error: Field CompanySetting__c does not exist. Check spelling [duplicate]

I can't figure out what's wrong with this field formula. Everything below in quotes has been copy/pasted directly so there are no typos AFAIK. Custom object API name = CompanySetting__c Custom ...
0
votes
1answer
80 views

check if a particular date falls in the current quarter

I have a requirement to check if a particular date field falls in the current Quarter. Hence for this I had used a Boolean formula Field which returns true if it falls in current quarter and false if ...
0
votes
1answer
39 views

Is Salesforce adding decimals wrongly?

Problem Description: Having weird decimals calculation Field 1(formula(Currency)): 0.53 Field 2(formula(Currency)): 5.27 Formula field Total = field 1 + field 2 Total = 0.53 + 5.27 Expected: ...
0
votes
1answer
81 views

Get picklist value LABEL in formula field

My question can sound trivial, but the issue below seems to be serious. We can use TEXT(field) to get picklist value in formula field. The issue is that this method returns API name of particular ...
0
votes
1answer
25 views

Can I store my block of apex code as formula field and execute in apex

I am trying to achieve like an Apex invoke-able method that takes input Object Name, field(s) to update, values for the corresponding field, Ids to use in query, the Apex method will query based on ...
0
votes
1answer
27 views

Formula field on opp using created date, record types, profiles, and multiple stage names

This formula works for all my requirement except the underlined part: IF( AND(RecordType.Name = 'Solutions', DATEVALUE(Account.CreatedDate) <= TODAY() - 10, CreatedBy.Profile....
0
votes
1answer
164 views

Current User's account id in formula field

I have created a formula field on x object, which needs to be checked against logged in User's Account ID. I checked it in global variable for the same $USER but not able to find anything.Can someone ...
-1
votes
1answer
22 views

Create formula checkbox field [closed]

I am trying to create a formula checkbox type field on custom object, which gets checked if related list "Notes & Attachment" has any files uploaded to it.
1
vote
2answers
103 views

Can a formula field be indexed?

I have a formula field called ContactID18__c on the Account object. The formula is CASESAFEID(PersonContact.Id). Can this field be indexed or no because it is a custom field and a formula? Or is ...
1
vote
1answer
42 views

Why time difference formula field showing 1 minute less or more in time difference?

I am calculating formula to get difference between to date/time fields. But in minutes section it always shows 1 minute less or sometimes 1 min extra. Example if Start Time- 08.06.2018 09:28 End Time-...
-1
votes
1answer
45 views

Formula field with Hyperlink

I am running into this issue ever since i started working on the formula field with hyperlink function: My formula is : HYPERLINK("https://mycompany.getfeedback.com/r/" & Token_ID__c & "?...
0
votes
2answers
39 views

Experiment : Formula field is not working using <> or !=

I am thinking maybe it something I should raise ticket to Salesforce but JIC I wrongly write the formula. I am doing validation rule at Opportunity side comparing two picklist value, one is from ...
0
votes
2answers
24 views

Account Name in Opportunity custom object

I'm trying to create a custom field on Opportunity object with account name. Can I use a formula to populate it automatically? I tried creating the custom field of type Text and adding Account.Name ...
0
votes
0answers
33 views

Show years from MultiPicklist field as a range

I have a multi picklist where we can select multiple years. Can I display these values as a range if there are some consecutive values selected? For example, if I choose 2014, 2015 and 2016 in this ...
0
votes
1answer
23 views

Formulas limits

I'm trying to write a formula in the custom field Aging__c, in the standard WorkOrder object as follows: IF(NOT(ISBLANK(DATEVALUE(EndDate))), Today - DATEVALUE(StartDate), DATEVALUE(EndDate) - ...
0
votes
0answers
28 views

Workflow Rule to include Line Break and Bullet points

I want to produce a workflow rule that inserts text into a Rich Text field. Currently it inserts the text as a long line. Here is the formula I'm using: "Text Line one" & BR() & "Text ...
0
votes
2answers
116 views

Formula field cannot be grouped in SOQL GROUP BY query call

I have a Pipeline__c object with fields Segment__c, Status__c, and Sales_Date__c (among many other fields). I also have a Sub_Pipeline__c object which is related to Pipeline__c. Inside I have the ...