Skip to main content

#Formulas40 personnes en discutent

Based on this Known Issue it looks like the ISCLONE() function isn’t supported in debugging entry criteria? Is this the final word on this?

 

Assuming the reasoning behind the Trigger Order functionality is accurate, then having a decision check after a flow initializes is not the same as handling in entry criteria. When building and testing flows we need to be able to test the design, not something “close enough”.

 

https://issues.salesforce.com/issue/a028c00000yESJlAAO/record-triggered-flows-with-isclone-entry-criteria-cannot-be-debugged

 

@Formulas - Help, Tips and Tricks 

1 réponse
  1. Aujourd’hui, à 11:59

    Hi Sean,

    Yes, the Known Issue indicates that ISCLONE() in the Start/entry criteria of a record-triggered Flow cannot be used with Flow Debugging. The limitation is specifically with debugging the flow when ISCLONE() is part of the entry criteria. 

     

    And I agree that moving the check into a Decision element isn't exactly equivalent—the flow has already started, so it doesn't test the same entry-condition behavior. 

     

    For testing, one workaround is to temporarily move the ISCLONE() logic into a Decision element while validating the rest of the flow, then restore it to the Start criteria. For the actual platform limitation, I'd also keep an eye on the Known Issue for any status/update from Salesforce. 

0/9000
Scott Holmes a posé une question dans #Trailhead Challenges

I'm getting stumped on this. Org wants to create a push notification for overdue tasks. I have done it using a record-triggered flow with 7 days and 2 days as being notifications email to say Task is about to be due. Could it just be a push notification which stays in Salesforce, notification sent to the notification bell once daily . 

 

#Trailhead Challenges  #Trailhead  #Salesforce Admin  #TrailblazerCommunity  #Sales Cloud  #Formulas

5 réponses
  1. 16 sept., 16:35

    Hi @Scott Holmes

     

    Yes, you can check the formula syntax directly in Flow Builder. Formula resources are created within the Flow, so you won't find their syntax in Object Manager.

    To view the syntax:

    1. Open your Flow in Flow Builder.
    2. Go to the Manager tab.
    3. Under Resources, select your Formula resource (Due in 7 Days / Due in 2 Days).
    4. Open the formula to view or edit its syntax.

    For example:

    Due in 7 Days:

    {!$Record.ActivityDate} = TODAY() + 7

    Due in 2 Days:

    {!$Record.ActivityDate} = TODAY() + 2

    You can also review Salesforce's formula documentation for additional functions and syntax. 

     

    Hope this helps!  

     

     If you find this response helpful, please mark it as the Accepted Answer, as it may also help other Trailblazers facing a similar issue. 😊 

0/9000

I have a screen flow that I'd like users to be able to access two different ways: from a field on the Opportunity Product object, as well as a Detail Page Button. What's paramount is where the screen flow returns at its end: I need it to end on a view of the product related list on the related Opportunity record. I got it to work successfully on the field version. Here's my formula field:  

 

HYPERLINK("/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product" &"?recordId=" &Id &"&retURL=/lightning/r/Opportunity/" & OpportunityId & "/related/OpportunityLineItems/view", 

"CLONE", 

"_self" 

) 

 

But for the life of me, I can't get the Button version of the URL to go back to the Product related list. I figured out that I can't reference the Opportunity Id via merge field in this scenario, so I created a formula field called Opportunity_Id__c, which just utilizes a CASESAFEID version of the Opportunity Id.  

 

In order to save time, here is a list of the various versions I've tried that DON'T work:  

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id}&retURL=/{!OpportunityLineItem.Id

} 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/&OpportunityId&/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/OpportunityLineItem.Opportunity_Id__c/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id}&retURL=/lightning/r/Opportunity/{!Opportunity.Id

}/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/{!OpportunityLineItem.Opportunity_Id__c}/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/Opportunity/&OpportunityLineItem.Opportunity_Id__c&/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id}&retURL=/lightning/r/OpportunityLineItem.Id

} 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/{!OpportunityLineItem.Opportunity_Id__c}/related/OpportunityLineItems/view 

 

/flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

OpportunityLineItem.Id

}&retURL=/lightning/r/&OpportunityLineItem.Opportunity_Id__c&/related/OpportunityLineItems/view 

 

 

Anyone have any thoughts, tips, or suggestions?  

 

#Flow  #Flows  #Screen Flow  #Formulas

5 réponses
  1. 15 sept., 01:26

    @Craig Munster

     

     

    Ah, that's the missing piece — and you're right, I was wrong to steer you off your formula field. On an Opportunity Product button the native OpportunityId genuinely isn't exposed in the merge-field picker (annoying known quirk). Your Opportunity_Id__c CASESAFEID field is exactly the right workaround, so keep it — custom fields DO show up under Insert Field. Just reference that one instead of OpportunityId: 

     

    /flow/Opportunity_Product_Screen_Flow_Clone_Opportunity_Product?recordId={!

    OpportunityLineItem.Id

    }&retURL=/lightning/r/Opportunity/{!OpportunityLineItem.Opportunity_Id__c}/related/OpportunityLineItems/view 

     

    That sends them back to the Products related list on the parent Opp. Sorry for the runaround getting there! 

     

    If this helps, please mark it as the Best Answer so it helps the next person — thanks 🙂

0/9000

I am working on a Row-Level report formula, and I keep getting a Missing ')' error on this formula. I've tried looking online for tips but I'm still missing something. 

 

I played around with it, so I might've made it worst. I am trying to create a validation field for various conditions.

 

Here's what I have:

 

If(Churn_Event__c.Effective_Date__c > TODAY(),

    If( OR(

            IF(AND(

                (ISPICKVAL(Churn_Event__c.Save_Successful__c, "yes")),

                Churn_Event__c.Total_Amount_of_ARR_Churned__c < Churn_Event__c.Churned_Revenue__c)

                "Yes",

            IF(AND (ISBLANK(Churn_Event__c.Save_Successful__c)),

                    Churn_Event__c.Total_Amount_of_ARR_Churned__c = Churn_Event__c.Churned_Revenue__c)

                "Yes",

            IF(AND (ISPICKVAL(Churn_Event__c.Save_Successful__c, "no")),

                Churn_Event__c.Total_Amount_of_ARR_Churned__c = Churn_Event__c.Churned_Revenue__c)

                "Yes",

                ),

          ),

    "No"), 

"No")

 

@Formulas - Help, Tips and Tricks 

1 réponse
  1. 14 sept., 18:53

    Hi Tarah, 

    I have reviewed the Row-Level Formula and identified the issue with the formula structure. The IF() statements were being used inside the OR() condition, which was causing the “Missing )” error.

    I have restructured the formula to validate the required conditions correctly: 

     IF( Churn_Event__c.Effective_Date__c > TODAY(), IF( OR( AND( ISPICKVAL(Churn_Event__c.Save_Successful__c, "yes"), Churn_Event__c.Total_Amount_of_ARR_Churned__c < Churn_Event__c.Churned_Revenue__c ), AND( ISBLANK(Churn_Event__c.Save_Successful__c), Churn_Event__c.Total_Amount_of_ARR_Churned__c = Churn_Event__c.Churned_Revenue__c ), AND( ISPICKVAL(Churn_Event__c.Save_Successful__c, "no"), Churn_Event__c.Total_Amount_of_ARR_Churned__c = Churn_Event__c.Churned_Revenue__c ) ), "Yes", "No" ), "No" )  

     

    This formula returns

    “Yes” when the Effective Date is in the future and any one of the three defined conditions is met. Otherwise, it returns “No.”

0/9000

I have a complicated issue due to how the shareholders want the data displayed and the calculations involved. 

What I am trying to do is simply get for Month 1 for the [Projected Carry From Prior Month] to be  

Month 0 ([Shipments Calc] + Month 0 [LOD Actual Demand]) -  Month 0 [Forecast) resulting in 24,422 ((14,490 + 111,872)-101,940). 

 

I kept the Old Formula for the [Projected Carry From Prior Month] metric in the workbook as it is made up of three calculations. The issue is when i bring in [LOD Actual Demand] I get the error of cannot mix aggregate and non-aggregate. No matter what I try I cant get the error to fix unless I break the [LOD Actual Demand] by taking off the additional SUM in the formula which results in the wrong answer. Any help would be greatly appreciated. Tried multiple  

 

Expected End Result of formula: 

Month 0 is 0 by default since there is no carryover. So for  

Month 0 the calc should show 0,  

Month 1 the calc should show 24,422 

Month 2 the calc should show 12,844 

Month 3 the calc should show 13,756 

Hoping there is a Fix for this LOD

 

 resources before asking here and they could not figure this out 

( 

 

#Tableau Desktop & Web Authoring  #LOD  #Formulas  #Tableau

7 réponses
  1. 14 sept., 13:50

    Thank you. I actually solved my own issue by (like most issues in Tableau) restructuring my data tables using SQL since Tableau can't handle calculations like PowerBI or Microstrategy. I simply combined the Actual Demand with the Past Due Tons before ingesting it to Tableau, therefore eliminating the additional LOD for Past Due Tons. Its wild to me how limiting Tableau is with calculations especially if you have used other BI tools. Thank you all for your help. 

0/9000

Want to create a formula on a specific Opportunity record type, 

 

Validation rule needs to prevent the Fund field from being updated to a fund that has a status of Liquidated or Liquidating. 

 

Can you please assist? 

Details below: 

 

Record Type ID= 01220000000AOdBAAW 

Fund = Fund__c (this is a lookup field) 

Fund Status= Fund_Status__c (this is a formula field) 

 

#Formulas

3 réponses
  1. 10 sept., 14:28

    @Alex Valavanis

      

    Because the status lives on the Fund record, reach it cross-object — a lookup lets you reference the parent's fields with the __r syntax, so Fund__r.Fund_Status__c works even though it's a formula field. Put this on the Opportunity validation rule (it fires / blocks the save when TRUE): AND( RecordTypeId = "01220000000AOdBAAW", OR(ISNEW(), ISCHANGED(Fund__c)), OR(Fund__r.Fund_Status__c = "Liquidated", Fund__r.Fund_Status__c = "Liquidating") ). The OR(ISNEW(), ISCHANGED(Fund__c)) limits it to when the Fund is actually being set or changed, so records that already point to a fund aren't locked if that fund later goes into liquidation. Two tips: match the exact text your Fund_Status formula outputs (the comparison is case-sensitive), and consider RecordType.DeveloperName = "Your_RT_API_Name" instead of the hardcoded Id so it survives sandbox refreshes and deploys. if this helps, please mark it as the Best Answer so it helps the next person — thanks 🙂

0/9000

Functions Inside Functions

The SUBSTITUTE function allowed me to make a text formula that turns a multiselect picklist into a list of values in the order I wanted and with no trailing separators. Niche use case, but super helpful when you need it.

https://www.freelikeapuppy.tech/post/functions-inside-functions

 

 

Functions Inside FunctionsThe SUBSTITUTE function allowed me to make a text formula that turns a multiselect picklist into a list of values in the order I wanted and with no trailing separators.@Admin Group, Philadelphia, US @Nonprofit User Group, Philadelphia, US @Admin Group, West Chester, US @Nonprofit and Education MindShare @Salesforce MVP Collaboration Space

 

 

#Formulas

1 commentaire
0/9000

Need help with the following LOD called "LOD Line Weekly Past Due Tons". Its essentially tons that have not shipped from prior months up to the current Month (Month 0). I would expect 11,562 to appear on every Month Number. I can get that with a simple Exclude. however when trying to add to "Actual Demand" of 100,310 I get 111,348 instead of 111,562. See "LOD Actual Demand Week" for the formula where I expected to see 111,562. Any Ideas how to get this to be able to add across correctly. See Test Tab 2

 

#Tableau Desktop & Web Authoring  #LOD  #Formulas  #Tableau

2 réponses
  1. 3 sept., 22:07

    @Blake Swan

     

    Hi, you may use:

    SUM({ FIXED [Charter Product Type],

    [Customer Name],

    [Customer Number],

    [Market Segment],

    [Product Type],

    [Month Number In Relation To Current]:

    SUM(

    IF [Month Number In Relation To Current] = 0

    THEN [Actual Demand]

    END

    )

    })

    +

    SUM({ SUM([Line Weekly Past Due Tons])

    })

    If this post resolves the question, would you be so kind to "Accept this Answer"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you. 

     

    Regards, 

     

    Diego Martinez 

    Tableau Visionary and Tableau Ambassador 

0/9000

Hello, 

 

I have a Formula field called Birthday this Year which just takes the value of the standard birthdate field and changes the year to this year:

DATE( YEAR( DATEVALUE( NOW() ) ) , MONTH( Birthdate ) , DAY( Birthdate ) )

 

I have a custom text field that I'm attempting to swap out the standard Birthdate field with in this formula above, but I can't get any output. I'm not sure if it's because the custom field is actually a text field, but there are properly formatted date values in that text field. Here's my formula: 

 

DATE( YEAR( DATEVALUE( NOW() ) ) , MONTH(DATEVALUE( Account.SL_BWM_Birthdate__c )) , DAY(DATEVALUE(Account.SL_BWM_Birthdate__c )))

 

Any ideas how I can transform a date in a text field into a date that's able to be pulled in above? 

 

Thanks,

Ashley

16 réponses
  1. 31 août, 06:20

    Yes — the issue is very likely that Account.SL_BWM_Birthdate__c is a Text field, and DATEVALUE() only reliably converts text when it is in Salesforce's expected date format.

    If your text field contains dates like 07/27/1985, try explicitly parsing the text into year/month/day rather than relying on DATEVALUE():   

    DATE( 

        YEAR(TODAY()), 

        VALUE(MID(Account.SL_BWM_Birthdate__c, 1, 2)), 

        VALUE(MID(Account.SL_BWM_Birthdate__c, 4, 2)) 

    ) 

     

0/9000

I have a formula field that assigns a code based on a picklist selection. This then populates a text field on a record created in a flow. 

 

I added a new code that starts with a zero (07). What I noticed though is when it populates the text field during record creation, it leaves the zero off the code.

How can I ensure that the zero remains? 

TEXT(IF( 

 

ISPICKVAL(Type_of_Grant__c, "Rent") 

|| 

ISPICKVAL(Type_of_Grant__c, "Utility") 

|| 

ISPICKVAL(Type_of_Grant__c, "Pharmacy") 

|| 

ISPICKVAL(Type_of_Grant__c, "Move-in") 

|| 

ISPICKVAL(Type_of_Grant__c, "Aging in Place") 

, 

 

23, IF(ISPICKVAL(Type_of_Grant__c, "Other") && Funding_Source__c = "Marc Berman", 23, 

IF(ISPICKVAL(Type_of_Grant__c, "PHP-Security Deposit (Non-Subsidized)"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "PHP-Security Deposit (Subsidized Housing)"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "PHP-First Month's Rent (Non-Subsidized)"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "PHP-First Month's Rent (Subsidized Housing)"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "PHP-Utility (Non-Subsidized)"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "PHP-Utility (Subsidized Housing)"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "STRMU-Rent"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "STRMU-Mortgage"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "STRMU-Utilities"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "C19R-Rent"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "C19R-Mortgage"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "C19R-Utilities"), 20, 

IF(ISPICKVAL(Type_of_Grant__c, "Measure A"), 07, 

IF(ISPICKVAL(Type_of_Grant__c, "DHSP Emergency Financial Assistance"), 20,

NULL)))))))))))))))))

 

 

#Formulas

2 réponses
  1. 22 juil., 00:24

    Two things: 

    1) your formula structure is quite strange. You are saying "if this condition, then return a number, but hten convert that number back to text" 

    If you want text, just return text immediately e.g.

    IF(ISPICKVAL(Type_of_Grant__c, "Other") && Funding_Source__c = "Marc Berman", 23,

    IF(ISPICKVAL(Type_of_Grant__c, "PHP-Security Deposit (Non-Subsidized)"), 20,

    can simply become:

    IF(ISPICKVAL(Type_of_Grant__c, "Other") && Funding_Source__c = "Marc Berman", "23",

    IF(ISPICKVAL(Type_of_Grant__c, "PHP-Security Deposit (Non-Subsidized)"), "20",

    Then you no longer need to wrap everything in a TEXT() function. 

     

    2) You should avoid multiple IF statements on picklist functions. It will massively increase your compile size. CASE() is far more efficient and easier to read. 

    CASE(

    Type_of_Grant__c,

    "Rent", "23",

    "Utility", "23",

    "Pharmacy", "23",

    "Move-in", "23",

    "Aging in Place", "23",

    "PHP-Security Deposit (Non-Subsidized)", "20",

    "PHP-Security Deposit (Subsidized Housing)", "20",

    "PHP-First Month's Rent (Non-Subsidized)", "20",

    "PHP-First Month's Rent (Subsidized Housing)", "20",

    "PHP-Utility (Non-Subsidized)", "20",

    "PHP-Utility (Subsidized Housing)", "20",

    "STRMU-Rent", "20",

    "STRMU-Mortgage", "20",

    "STRMU-Utilities", "20",

    "C19R-Rent", "20",

    "C19R-Mortgage", "20",

    "C19R-Utilities", "20",

    "Measure A", "07",

    "DHSP Emergency Financial Assistance", "20",

    "Other",

    IF(

    Funding_Source__c = "Marc Berman",

    "23",

    NULL

    ),

    NULL

    )

0/9000