Posts

Showing posts from August, 2023

Salesforce Fact #749 | Empty key Id in Salesforce

Image
There is an empty key Id in Salesforce and the id is ' 000000000000000AAA'. This is equivalent to NULL or no-reference to parent record. This can be used in place of NULL while updating records via data loader without enabling the 'insert null values' setting. Reference:  http://www.fishofprey.com/2011/06/salesforce-empty-key-id.html Attached is one screenshot.

Salesforce Fact #748 | Screen reactivity on input placeholder

Image
Screen reactivity feature works perfectly on input placeholder attribute as well. In this example, we are updating the placeholder text based on the selected account name from the lookup. Attached are the screenshots.

Salesforce Fact #747 | Pass selected record from LWC datatable to screen flow

Image
Suppose we have a lightning-datatable in LWC and we want to pass the selected record data to the screen flow and show the field values in different inputs. We can do that using lightning/flowSupport in LWC. References:  https://automationchampion.com/2023/07/17/pass-data-from-lightning-web-component-to-screen-flow-3/ https://salesforce.stackexchange.com/questions/370321/passing-selected-datatable-rows-to-flow-collection-inside-of-a-screen-flow Attached are the screenshots. Note: Screen reactivity option is to be enabled in Process Automation Settings

Salesforce Fact #746 | lwc:else is optional

Image
Just like most of the programming languages, lwc:else is optional even if we are using lwc:elseif. In this example, we want to show data if the user is assigned either custom permission1 or custom permission2, but we don't want to show anything otherwise. For more details, check out:  https://developer.salesforce.com/docs/platform/lwc/guide/create-conditional.html Attached are the screenshots.

Salesforce Fact #745 | Aloha feature

There is a feature called 'Aloha' in Salesforce.  Once a package is passed the AppExchange security review process, limits such as number of tabs/custom objects are bypassed. The package would still get installed even if the installation org has reached any of those limits. This is referred to as Aloha.

Salesforce Fact #744 | Named credential error

Have you encountered this error: 'The callout couldn't access the endpoint, You might not have the required permissions or the named credential <Named Credential name> does not exist'. One of the reason could be the user doesn't have access to the 'User External Credentials' object. To resolve this, provide Read access to the user on this object. Reference:  https://salesforce.stackexchange.com/questions/398401/named-credential-not-accessible-by-non-system-admin-profiles

Salesforce Fact #743 | Multiple reset passwords from screen flow

Image
We can create a screen flow for admin users to help them reset passwords for multiple users at once. Also, an invocable apex method is needed. Attached are the screenshots. Note: Each call to System.resetPassword() counts as 1 DML statement.

Salesforce Fact #742 | Another POC on flow Http callout

Image
Suppose we want to get the country flag image for account shipping country in account detail page. We can use HTTP callout from screen flow to get the data. Attached are the screenshots.

Salesforce Fact #741 | Pass custom apex defined type from LWC to screen flow

Image
We can pass apex defined type data from screen flow to LWC. Similarly, the data can be passed the other way around. In this example, we have a custom apex defined type which we are setting from the LWC and then passing it to the screen flow. The data can be accessed in the next screen, not in the same screen where the LWC is added. Attached are the screenshots.

Salesforce Fact #740 | External user self-deactivation

There is a settings in User Management Settings which allows the external users to deactivate their own accounts. Reference:  https://help.salesforce.com/s/articleView?id=sf.users_deactivate_external_option.htm&type=5

Salesforce Fact #739 | Clone with related

While using the 'Clone with Related' option, the related records are cloned in batches of 200. Validation rules, workflow rules and apex triggers are applied separately for each batch. Also, the selected related records can't be more than 999. Reference:  https://help.salesforce.com/s/articleView?id=sf.basics_clone_records.htm&type=5

Salesforce Fact #738 | Star rating in screen flow

Image
Just like we can use Star rating images  in formula fields, we can use the same way in flow text templates. Attached are the screenshots.

Salesforce Fact #737 | Show acceptable file format icons using LWC in screen flow

Image
We have a File Upload input type in screen flow. It does have accepted file formats parameter, but doesn't show visual indicator for the same. Why not use an LWC to show acceptable file format icons using the base lightning-icon component. Attached are the screenshots.

Salesforce Fact #736 | Instant success/error message on password re-enter

Image
We can show instant success/error message in the scenario of re-enter password validation in screenflow. This can be done using component visibility on two Display Text inputs. Note: This is not dependent on the reactive screen beta feature. Attached are the screenshots.