Posts

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.

Salesforce Fact #977 | Formatted label in screen flow input

Image
In some scenarios, we need to show the screen input element labels as formatted. For example, the label of a text input would be bold. For this, we can create a text template and put the formatted text and then refer this text template resource in the input label. Note: The extra <p> tags needs to be removed else the help text and required icons would get distorted. Attached are the screenshots.

Salesforce Fact #976 | External service issue in apex

While referencing the external services in apex, we might encounter error like: Dependent class is invalid and needs recompilation: Class ExternalService.MyCallout : Unexpected token '2'. This is a known issue. The workaround is to replace '2XX' with '200' in the JSON of external service. Reference:  https://help.salesforce.com/s/issue?id=a028c00000uW9g4

Salesforce Fact #975 | Field history tracking issue with system context

There's a loophole with the field history tracking when the automation is executed in system context. If the user doesn't have the object access/field access and the automation executes in system context without sharing mode, then the record gets created and the audit fields are stamped correctly but the field history related list stays blank. Here's the relevant Idea link:  https://ideas.salesforce.com/s/idea/a0BHp000019OmswMAC/enable-field-history-for-system-mode-dmls-regardless-of-object-permissions Reference:  https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000mjpO60AI

Salesforce Fact #974 | External credential not configured issue fix

After deploying the external credential and external service registrations to the higher orgs, you might encounter the error from flow while invoking the callout: 'The external credential isn't fully configured. Try reconnecting to the external system or contact your Salesforce admin'. To fix this issue, Go to the external credential -> Under Principals section, check the authentication status -> if it is not configured, click dropdown -> edit -> populate the correct Client Id & Client Secret -> Save. This will update the authentication status to Configured.