0

I've been transforming hard-coded text from Field Service Mobile Flows into Custom Labels for our translation efforts.

I know you can't apply the Custom Labels directly on any Display Text component inside these flows. Still, I found a workaround (https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007ReVvRSAV) stating that instead of using the label directly, you create a Formula Text Resource, then grab the custom label from that and apply the Formula to the Display Text component.

I've done that, yet when opening any flow in the FSL App, all texts are empty. Is there any extra limitation that I'm not aware of?

The formula I created

The screen inside the FSL App

2 Answers 2

0

I found this https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007ReVvRSAV - seems like you should use Resource Formula: Here's how to use Resource Formula to add custom labels to FSL mobile flows:

Create a custom label definition in your Salesforce org. Create a Resource Formula record in your Salesforce org. The formula should return the value of the custom label. In your FSL mobile flow, reference the Resource Formula record in the Value property of the screen or component that needs the label. Here's an example of how to use Resource Formula to add a custom label to a text component:

Create a custom label definition with the following details: Label Name: My_Custom_Label Label Value: This is my custom label Create a Resource Formula record with the following details: Formula: {!GET('My_Custom_Label')} In your FSL mobile flow, add a text component and set the Value property to the Resource Formula record you created. The text component will now display the value of the My_Custom_Label custom label. Here's an example of how to use Resource Formula to add a translation to a button component:

Create a custom label definition with the following details: Label Name: Button_Label_English Label Value: English button label Create another custom label definition with the following details: Label Name: Button_Label_Spanish Label Value: Spanish button label Create a Resource Formula record with the following details: Formula: $Language == 'en_US' ? {!GET('Button_Label_English')} : {!GET('Button_Label_Spanish')} In your FSL mobile flow, add a button component and set the Label property to the Resource Formula record you created. The button component will now display the appropriate label based on the user's locale.

4
  • 1
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Commented Oct 31, 2024 at 1:56
  • 1
    As you can see in my post, I already followed that link (The link is in the post itself) and followed those steps to no avail. I've opened a case with Salesforce and will post any further developments / workarounds here. Commented Nov 1, 2024 at 17:51
  • Hey @TheJPcast, but if you take a look at the link, it uses the label a bit differently >> In the Formula field, use the $GET function to retrieve the value of the custom label you created. So, not {!$Label.My_Custom_Label}, but {!GET('My_Custom_Label')}. Commented Nov 4, 2024 at 9:00
  • 1
    @mpaun Yeah, I noticed that, but the $GET function didn't seem to be available. After discussion with salesforce, a workaround for the workaround was found, detailed down below in my answer. Commented Nov 5, 2024 at 11:26
0

I've spoken with Salesforce about this. The solution documented above (Adding the Custom label inside a Flow resource) does not work. Instead, the offered workaround was creating a new Custom Field inside the objects for each Custom Label.

For our use case,we created a new Custom Object and the respective fields and called the "Get Record" element inside our FSM Flows.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.