Posts

Salesforce Fact #984 | Using < in LWC template expressions

Image
LWC now supports template expressions. However, the use of less than operator(<) has some limitations. It doesn't work in text nodes, works within expressions which are quoted as attributes. The workaround is to use the other way i.e. use the greater than or equal to operator to get the desired result. Attached are the screenshots. Reference:  https://developer.salesforce.com/docs/platform/lwc/guide/create-components-html-expressions-compatibility.html

Salesforce Fact #983 | Access stage resource in another flow

Image
Do you know we can use a stage resource in one flow which has been defined in another flow. Here is the syntax to access the stage -> namespace:flowName:stageName In the example screenshot, we are accessing the stage resource 'StageA' which has been defined in 'Mainflow1' and setting it as the current stage.

Salesforce Fact #982 | Field integrity exception while deploying a flow

We might encounter the below error while deploying a flow, which calls a subflow and accesses it's outputs: field integrity exception: unknown (the element has an invalid reference to The fix is to deploy the subflow first and then the main flow. Reference:  https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000Kg0LM0AZ

Salesforce Fact #981 | Issue with multi select picklist field on User object

There's an issue with accessing the multi select picklist field on user object. While accessing it for the current user in flow's formula resource it doesn't work as expected. 1) It does not appear in the search result. However if we enter it manually, the formula gets saved. 2) The INCLUDES function does not work. Always returns FALSE, even when it is expected to return TRUE. The workaround is to use a Get Records on the User object and then use a decision element with Contains operator.

Salesforce Fact #980 | Mass delete paused flow interviews

There can be multiple paused flow interviews of a flow and these paused versions do not allow to save new version of the flow. We can run a query on the FlowInterview object to fetch the paused flow interview of a particular flow and then delete those at once. The InterviewLabel field can be matched against the api name of the flow. Example query: Select Id FROM FlowInterview WHERE InterviewLabel LIKE '%<API name of flow>%' AND InterviewStatus = 'Paused' Reference:  https://help.salesforce.com/s/articleView?id=000388016&type=1

Salesforce Fact #979 | Choice resource quick create in screen flow

Image
While setting choice resource in radio button or picklist input in screen flow, we can make use of the quick create feature. In the choice input, we can simply enter the name of the choice and select the 'Create Choice' option. In the backend , it will create a choice resource with the entered value. Attached are the screenshots.

Salesforce Fact #978 | Hide action button in screen flow

Image
We can hide the screen flow action button based on component visibility. Suppose we need to make sure the action button once clicked it should get hidden. It should be visible again once the user comes back from any previous or next screen. For this, we can define a boolean variable in the subflow and also make use of the InProgress attribute of the screen action. These two values can be used in component visibility to show/hide the button. At the start the boolean variable is null and the inProgress attribute is null if the action button has been called once and we come back to the screen from any previous/next screen. Attached is the screenshot.