Posts

Showing posts with the label translation

Salesforce Fact #910 | Picklist Contains operator in flow Get Records with translation

Image
Similar to apex, we need to be careful while using Contains operator in flow along with picklist translation. In this example, we have added the french translation for the Account Industry picklist value 'Banking'. Now, while using Contains operator on the Industry picklist in Get Records element, it works fine for English language but does not work for French language. No records are fetched in the Get Records for french user. To resolve this, we need to remove the Contains check from the Get Records and check the same by adding a decision element afterwards. Attached are the screenshots.

Salesforce Fact #883 | Careful while accessing getObjectInfo to get record type details

Image
We need to be careful while using getObjectInfo module to access the record types in LWC. We can access the record type name property and there is no developer name property present. The name returns the label of the record type and if translation is present for the user language then the translated value is returned. So, we need to be careful while doing any check to match the record type name. There is an Idea already submitted to add the Developername in the data returned:  https://ideas.salesforce.com/s/idea/a0B8W00000H50x7UAB/include-developername-in-the-recordtypeinfo-returned-with-getobjectinfo-in-lwc Attached are the screenshots.

Salesforce Fact #872 | Query custom label translations

It is possible to query custom label translations using Tooling API and using the object ExternalStringLocalization. Below is a sample query: SELECT Id   ,ExternalStringId   ,ExternalString.Name   ,ExternalString.Value   ,Value   ,Language  FROM ExternalStringLocalization  ORDER BY ExternalString.MasterLabel, Language Reference:  https://salesforce.stackexchange.com/questions/357686/can-i-query-for-custom-label-translationshttps://salesforce.stackexchange.com/questions/357686/can-i-query-for-custom-label-translations

Salesforce Fact #803 | Add translations for standard country/state picklists

How to add the translation for the standard country and state picklist values? We can use Translation Workbench to add the translations. Steps: Setup -> Translate -> Choose the language -> In setup component, select Address Country or Address State -> Add the translations.

Salesforce Fact #766 | Translation for flow custom error message

Image
With the Winter'24 release, we have the flow custom error component available for use. We can use both custom label and translation workbench to enable translation for the error message shown using this element. Attached are the screenshots.

Salesforce Fact #758 | Screen flow version in translation workbench

Image
If we have enabled the translation of the screen flow components using translation workbench, we need to be mindful of keeping a note of the active version. If we are deploying the new version of the flow, the translation needs to be added for the new version. Attached is one screenshot.

Salesforce Fact #670 | Translation for screen flow navigation button labels

If we are using custom label value for the Previous/ Next/ Pause button in the screen flow instead of the standard button labels, we can add the translation for the same using translation workbench. Reference:  https://help.salesforce.com/s/articleView?id=release-notes.rn_automate_flow_builder_custom_footer_labels.htm&release=236&type=5

Salesforce Fact #657 | RecordTypeLocalization

Image
There is an object RecordTypeLocalization which stores the translated value of record type label when translation workbench is enabled in the org. Reference:  https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_recordtypelocalization.htm Attached are example 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.