Posts

Showing posts with the label record type

Salesforce Fact #673 | Navigate to record type selection page

Image
We can use the 'useRecordTypeCheck' property in LWC NavigationMixin in order to navigate to the standard record type selection page while creating a new record. Reference:  https://salesforce.stackexchange.com/questions/254498/lightning-web-components-navigate-to-the-new-object-page-passing-in-specific Attached is the screenshot.

Salesforce Fact #669 | Get available record types in screen flow

Image
In order to check in which all record types the current user has access in screen flow, we can write an invocable apex method which makes use of the getDescribe() method and return the results. In this example, we are checking the record type access for the current user for Account object. Attached are the screenshots.

Salesforce Fact #629 | Translation does not impact record type name filter in app builder

Image
If we are using record type name filter on the lightning app builder as part of conditional visibility of any component/section, it is not impacted by translation. In this example, we have put a filter on a component so that it will be visible on the record page only if the account record type name is 'Test RT1'. Now, if the translation is added for record type label in translation workbench for French language and the user language is also changed to french. The filter works perfectly in the french language context as well. However, as a best practice Record type developer name should be used  instead of record type label  to avoid any inconsistency. Attached are the screenshots.

Salesforce Fact #567 | Display picklist based on record type in screen flow

Image
Now we can filter out picklist values based on record type in screen flows. We can use record variable and set the RecordTypeId field with the corresponding id and use the same record variable in the screen and the picklist values will appear accordingly. In this example, we have two record types on account: Test_RT1 & Test_RT2. The rating picklist values are respectively Hot, Warm and Cold. The same appears in the screen flow. Reference:  https://help.salesforce.com/s/articleView?id=release-notes.rn_automate_flow_builder_filter_picklists_by_record_type.htm&type=5&release=240 Attached are the screenshots. Note: do not use hardcoded ids. it is only for demonstration purpose.