Posts

Salesforce Fact #1000 | Call expression set in flow screen action

Image
We can call expression set from flow as flow actions and it can also be called as a screen action. In this example, we have setup a simple decision matrix which returns the discount percentage to apply based on the membership tier. The expression set is invoked from an autolaunched flow which in turn is called as a screen action to calculate the final amount. Attached are the screenshots.

Salesforce Fact #999 | User permission check using LWC exposed as flow local action

Image
With the Winter'26 release, we can now create flow local actions using LWCs. One use of this feature is checking user/custom permission of the current user. Suppose we have created a screen flow and in between the process we need to check whether the current user has the permission to Activate Contracts and then route to the appropriate path. This can be easily figured out using the userPermission module in LWC and the same LWC can be utilized as a local flow action instead of using any complex apex code logic. Attached are the screenshots.

Salesforce Fact #998 | Show OmniScript step only during forward navigation

Image
Suppose we want a particular step in OmniScript to be visible only during the forward navigation and it should not visible during previous button click. To implement this, we can use one flag variable and two set values elements and the same flag can be used in the conditional view of the particular step. The first set value would set the flag to true and next one will set the flag to false. In this example. we are using the flag variable showStep2 to show the step2 only during forward navigation. Attached is the screenshot.

Salesforce Fact #997 | Create Sobject record and upload files in one go in Omnistudio

Image
Suppose we have a requirement in Omnistudio where the user needs to enter some data in the Omniscript to create an Sobject record and also would upload one or more files to attach to the same record. For file input, there is a Content Parent ID attribute which can be populated, but in this case the parent record is not created yet. In order to achieve this, we can create a Data Raptor Load to create the Sobject record and then using Linked mapping we can map the LinkedEntityId and the ContentDocumentIds can be passed from the JSON node. In this example, the user creates an account record and at the same time, uploads and attaches one or multiple files to the created record. Reference:  https://help.salesforce.com/s/articleView?id=xcloud.os_upload_files_and_images_in_omniscripts_23397.htm&type=5 Attached are the screenshots.

Salesforce Fact #996 | SOQL LIKE operator on multiple values

The SOQL LIKE operator can be applied to multiple strings. For this, we can construct a set/list with the values and use that in the SOQL query. This avoids writing LIKE operator for each of the values. Reference:  https://salesforcelynx.medium.com/how-to-use-like-keyword-once-for-multiple-string-comparison-in-a-soql-823020345a3e

Salesforce Fact #995 | NULL filter issue in Data Mapper Extract

Image
There's a known issue while using equals to NULL filter in Data Mapper Extract. To fix this, we need to add a not equals to operator. In this example, we are fetching contacts without AccountId populated. Attached are the screenshots.

Salesforce Fact #994 | Setting default value of Sobject Select inputs in Omniscript

Image
If we are using the Select input of Sobject source in Omniscript, there is no point & click option to configure the default value. We can make use of the 'Edit Properties As JSON' option to set the default value. In this example, we are selecting an account from the typeahead block in the previous step and in the current step, setting the default value of the Active picklist in the JSON as:  "defaultValue": "%AccountInfo:SearchAccount-Block:Active__c%" Attached are the screenshots.

Salesforce Fact #993 | Type Ahead block with Turbo Extract

Data Raptor Turbo extract adds a parent node in the response JSON. So, while using it with Type Ahead block the parent node needs to be specified in the Response JSON Path to get the desired output. Reference:  https://help.salesforce.com/s/articleView?id=000394510&type=1

Salesforce Fact #992 | Enable Flexcard Designer

If you are not able to access the Flexcard Designer, check if you have access to the Vlocity Card Designer lightning record page. Reference:  https://help.salesforce.com/s/articleView?id=000390893&type=1

Salesforce Fact #991 | Integration Procedure: get current user id

In order to get the current user id in IP, we can use a Set Values element and populate the value:  =%$Vlocity.UserId% in one attribute. And in subsequent elements we can get the value similar to the below syntax: %SetCurrentUserId:currentUserId% here  SetCurrentUserId is the Set Values element name and  currentUserId is the attribute name.

Salesforce Fact #990 | DataRaptor: Fetch accounts without any related contacts

Image
Here's one approach to find out the account names with no related contacts using DataRaptor Extract. Attached are the screenshots.

Salesforce Fact #989 | New delete files permission

Image
There's a new app permission 'Delete Salesforce Files' has been introduced in Spring'26. It can be assigned using a profile or permission set. This allows the users to delete accessible files irrespective of the ownership. The app permission can be checked in LWC as well similar to other app permissions. Attached is the screenshot. Reference:  https://help.salesforce.com/s/articleView?id=release-notes.rn_experiences_files_delete_files.htm&release=260&type=5 However, there seems to be one issue; With this permission, a user can delete a file with only view access to the file. Hope Salesforce will put further restriction to fix this in upcoming releases.

Salesforce Fact #988 | Disable radio button on screen navigate

Image
Suppose we have a requirement that a radio button needs to be selected by the user in the current screen. Once the user moves previous/next from the current screen, it should get disabled. We can implement this using screen action and bit of condition logic. We can add condition to make sure the screen action autolaunched flow is called only once. And we can create a formula resource to check the InProgress and IsSuccess property of the action button which is used in the disabled attribute of the radio buttons. Attached are the screenshots.

Salesforce Fact #987 | Skip matching records in flow create records

Image
The 'Skip the matching records' option flow Upsert operation is pretty helpful. If this option is selected, the flow first fires a SOQL to find out the matching records and if any found, skips the Create DML. This is not the case in Apex and in case of Upsert, it always fires the DML regardless of the record's existence. Attached is the screenshot.

Salesforce Fact #986 | Track first radio button select in screen flow

Image
Suppose we have a requirement to keep track of the first selected radio button in screen flow. For this, we can create an autolaunched flow and call it as a screen action. This flow will accept the first selected value and assign to a variable. We also need to set the action run condition in a way so that the subflow is called only once. In this example, we have a radio button with three values: Option1, Option2, Option3 and in the action run condition we have specified to call this flow till the currentValue resource is null. Attached are the screenshots.

Salesforce Fact #985 | Exit flow from any screen in screen flow

Image
Suppose we have a requirement to let the user exit from any of the screen in screen flow. We can use the FlowButtonBar component from UnofficialSF to implement this. However, if we want to go with the out of the box approach, here is how we can achieve it. We can create an LWC which will be embedded in each of the screens and will have an exit flow button. It will have an @api var which is set on click of confirmation from the user and sent back to the screen flow. Based on this value, we can add a decision check to find out whether user has opted to exit the flow and can route the user to the exit. Also, on confirmation from the user, we call the FlowNavigationNextEvent to proceed to the next element in the flow. One tricky thing is if the screen has outstanding validation errors then it won't move to the next screen. So, when the user opts for exiting the flow, we hide the existing inputs and then moves the user to the exit path. Attached are the screenshots.

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.