New answers tagged

0

I recently published an app named Unleash Your Formula. https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3u00000MS8T1EAL The app does something simple, it copies and syncs formula fields to a specified non-formula field (of the same type). This is an effective way to handle character limits for your situation. First create 3 new (non formula)...


0

The specific answer to the formula question you have is: You have: CreatedDate ">=1/01/2020" and "<=31/12/2020" this is not a valid formula expression You'll want something like this: CASE(YEAR(DATEVALUE(CreatedDate)), 2020,CASE(CurrencyIsoCode, 'EUR',1.11, ...), 2021,CASE(CurrencyIsoCode, ...


1

Have you looked into enabling Multiple Currencies and then turning on Advanced Currency Management in order to use date-range enabled exchange rates? There are implications, for example you cannot undo it once you've enabled multiple currencies and there are a whole host of things you want to be familiar with before you turn it on. But in terms of best ...


1

I used in a formula if($Organization.Id ='00xxx000000xxxx' ... where 00xxx000000xxxx was Production Org id, only to find out that, in Sandbox, the text was substituted by the Sandbox Org id after refresh. So my best alternative would be to split the text in 2 parts: if( LEFT($Organization.Id,11) ='00xxx000000' && RIGHT($Organization.Id, 4) ='xxxx' .....


1

You are doing some unecessary calulation here, but the heart of the issue is that you're using OR to make the range comparisons. For sake of simplicity, what you have boils down to this if(membership <= 1 year){ return 5; }else if(membership > 1 year || membership <= 3 years){ return 10; } ... We don't need to go further than that. If we ...


0

You are making a mistake in your business logic. You should evaluate the logic and use && instead of || as you have bounded requirements in terms of years as Length of membership should be between a certain bracket to return a value.


0

I recently published an app named Unleash Your Formula. https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3u00000MS8T1EAL The app does something simple, it copies and syncs formula fields to the specified non-formula field (of the same type). This is an effective way to handle character limits. Most character limit issues arise because the ...


2

To answer your exact questions: Yes you can reference the parent via a Formula. Yes the child can change based on the Parents formula, asuming you are referencing the parent someway in the childs formula. The challenge with a Large formula is the compile size another formula referencing it may blow out the limits. there are a few tricks you can use to reduce ...


0

You need to use Workflow Rules, not Validation Rules. In the WF Rule: Check if Account Minimum has changed, and if Account was Active. AND( Active_Proactive_field__c = 'Active', Account_Minimum_field__c > PRIORVALUE(Account_Minimum_field__c) ) Create a Field Update to change Account to Proactive. This will change Active_Proactive_field__c if ...


0

I changed the formula to something like this and it seems to be working now: IF( AND ( FON_Membership_Status_Formula__c = 'Active' && FON_Membership_Entity__c = 'Account' ) || NOT( ISBLANK(Parent_Membership__c ) ) ,"Member", "Non-Member")


0

What about... IF( OR( AND( FON_Membership_Status_Formula__c = 'Active', FON_Membership_Entity__c = 'Account' ), NOT(ISBLANK(Parent_Membership__c)) ), "Member", "Non-Member" )


0

I was not able to figure out why the Id__c reference was incorrectly returning the record Id, but I ended up just handling this eventuality in my formula, assuming that the if Id__c was equal to Id, then it's blank. My resultant formula was something like: {!IF( Account.Id__c = Account.Id || ISBLANK( Account.Id__c ), URLFOR("http://isBlank.com&...


0

Formula fields do not support your business need. Instead, make use of a Flow configured through the Flow Builder. Here are some high level steps you can follow: Create record-triggered flow to run when your Account is create and/or update. Your Flow should run after-save. You should create a Get Records block to query the Account Team Member object with a ...


0

In Derek F's answer to the Similar Post you included in your question, the two fields were being used differently: one field for entering "2.5" to mean "two and one-half hours" (what Derek F called decimal), and the other field for entering "2:30" to mean "two and one-half hours" (what Derek F called time). Since you ...


0

My guess is that the CreatedDate fields are never matching because they store the time part as well. If you just want to compare the date parts, try this in your formula: DATEVALUE(Contact__r.CreatedDate) <> DATEVALUE(CreatedDate)


1

No matter how many decimal points you choose to show in a formula or number field, Salesforce internally calculates and tracks high precision (I believe 18 points after the decimal). Even if your formula is set to 2 places, it is internally calculated at a much higher resolution; the setting affects only how many decimals are shown in the UI/Reports/API. ...


1

Few Steps needs to confirm in your org's Process builder or flow - In processes and flows, a formula can reference a record’s field via a lookup relationship field or record variable. If the lookup relationship field or record variable is null, the formula sometimes returns null. Otherwise, it returns an unhandled exception. In Spring 21 release, Salesforce ...


3

Naga's comment is (at least partially) correct. What happens is that each Flow is evaluated in turn, in a round-robin sort of way, pausing each Flow when it reaches a DML or Query block. Once all Flows are paused because of this condition, all of the query conditions or DML operations are grouped into a single action for bulkification, and then the query or ...


1

If you know the number of days and that every week has 7 days then it is just a matter of rounding the result as required. There is a fairly good post in the Trailblazer community on doing this - Calculating Week count based on a date field. The formula that Patrick Sullivan gave: ROUND((Today()-Date__c)/7,0) Note, that is for dates in the past. You'll want ...


0

The IF() function in the formula needs 3 parameters to evaluate: the first one is a logic that evaluates to true or false, second argument/statement execute if the logic evaluates to true and the third one to execute if the logic evaluates to false. So in case, you would need to do what you did for a single picklist for all the 10 fields. IF( ...


3

The syntax is: IF(condition, value_if_true, value_if_false) You need value arguments, not just the condition. Likely you meant: IF(NOT(ISPICKVAL(Field_A__c,""), 1, 0)


Top 50 recent answers are included