How can I use Custom Labels in Field Service Mobile Flows?

Question

I’ve been replacing hard-coded text in Field Service Mobile Flows with Custom Labels to support translations. Since Custom Labels cannot be applied directly to Display Text components, I followed a workaround that suggests creating a Formula Text Resource to reference the Custom Label, then using that formula in the Display Text component. However, when I open the flow in the FSL Mobile App, all text fields appear empty. Are there any additional limitations or considerations that could be causing this issue?

Answer

Field Service Mobile Flows

Yes, there are specific steps and considerations when using Custom Labels in Field Service Mobile (FSL) Flows. The recommended approach is to use a Resource Formula to reference the Custom Label and then apply it in the flow components. Here’s how you can do it:

  1. Create a Custom Label in your Salesforce org.

Example:
Label Name: My_Custom_Label
Label Value: This is my custom label

2. Create a Resource Formula inside the Flow. The formula should return the value of the Custom Label.

Example Formula:

{!GET('My_Custom_Label')}

3. Use the Resource Formula in your Flow by referencing it in the Value property of the Display Text or Button Label.

If using a Display Text component, set its value to the created Resource Formula.
If using a Button, set the Label property to the Resource Formula.

Handling Translations

If you need to display different text based on the user’s locale, you can extend the Resource Formula to include conditional logic.

Example Formula for multilingual support:

$Language == 'en_US' ? {!GET('Button_Label_English')} : {!GET('Button_Label_Spanish')}

With this formula, the button will display the appropriate label based on the user’s language settings.

Why Might the Text Be Empty in the FSL Mobile App?

If you’ve followed these steps and the text still appears empty in the FSL app, consider these potential issues:

Custom Label Accessibility: Ensure the Custom Label exists and is accessible in the flow execution context. Try using a test label with simple text.

Formula Evaluation Limitations: The FSL Mobile Flow runtime might not evaluate formulas the same way as standard Flow execution. Test by using a simpler formula without conditionals.

Flow Debugging in FSL App: Try running the flow in the browser version first to check if the formula is correctly resolving. If it works in the browser but not in the mobile app, the issue could be specific to FSL’s handling of formulas.

FSL App Version: Ensure your FSL Mobile App is up to date. Some features and workarounds may not function correctly on outdated versions.

If after verifying these factors the issue persists, consider testing with a simple static text formula and gradually introducing complexity to isolate the problem.

Job-Oriented Salesforce Training with 100% Money Back Guarantee

Our Salesforce course is meticulously designed to provide a comprehensive understanding of the Salesforce platform, equipping you with the essential skills to excel in the CRM industry. The curriculum includes key modules such as Salesforce Admin, Developer, and AI, integrating theoretical knowledge with hands-on experience. Through real-world projects and practical assignments, you’ll gain the expertise to tackle complex business challenges using Salesforce solutions. Our seasoned instructors ensure you acquire both technical proficiency and industry insights to thrive in the Salesforce ecosystem.

Beyond technical training, our Salesforce training in India offers personalized mentorship, certification guidance, and interview preparation to enhance your career opportunities. You’ll have access to extensive study materials, real-world project exposure, and continuous support throughout your learning journey. By the end of the program, you’ll be fully prepared for certification exams and equipped with problem-solving skills that employers seek. Take the first step in your Salesforce career today and explore endless possibilities. Register for a Free Demo now!

0
Would love your thoughts, please comment.x
()
x