Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [customlabel]

Custom labels enable developers to create multilingual applications by automatically presenting information (for example, help text or error messages) in a user’s native language.

1
vote
1answer
15 views

Use an URL as a custom label in a custom link

I am working on an assignment where a custom URL needs to be provided on the Contact to open a training portal website when clicked. The DEMO and PROD salesforce instances need to open different ...
1
vote
1answer
27 views

Should custom labels be used as constants?

From the documentation Custom Labels are primarily meant for multi-language translation use, but our company does not use them for this purpose, but uses them extensively for text used in pdfs/VF ...
0
votes
0answers
38 views

Custom Labels and $Label

I am not sure what is happening behind this $Label line: <aura:component controller="CommunityHoldingDetailController" > <aura:attribute name="holding" type="Holding__c" required="true" /...
1
vote
1answer
12 views

Blank labels in flow formula after packaging

I'm working on a managed package which include a Flow. I want some fields on this Flow to have their labels alterable so i used "Formula" inside the flow with custom labels. This works fine on my ...
2
votes
0answers
87 views

LWC: how to dynamically get translated value from Label

In Aura we used to do this: let labelName = 'mylabel'; $A.getReference("$Label.c."+ labelName); In LWC $A is not accessible anymore. Following the documentation I can only see a way to get access ...
2
votes
1answer
61 views

Access all label from one import in component(LWC) [duplicate]

I am trying to access label in a component(Lightning web component). import greeting from '@salesforce/label/c.xxxx; import greeting from '@salesforce/label/c.yyyy; ... I want to access all labels ...
0
votes
1answer
50 views

Unable to update namespace of custom labels in managed package

I have a lightning component as part of a managed package that uses few custom labels. The custom labels are saved with the default namespace like {!$Label.c.label_name}. I am trying to update this ...
3
votes
3answers
49 views

Is it possible to pull specific language from custom labels by changing the users language

Using anonymous apex in my dev sandbox I did the following: User myUser = new User(); myUser.Id = UserInfo.getUserId(); myUser.LanguageLocaleKey = 'sv'; myUser.LocaleSidKey = 'sv'; update myUser; ...
2
votes
1answer
30 views

Custom Labels - Working around their limits

My team is currently undergoing a discussion related to adding support for more languages using salesforce's custom labels. I've used custom labels before but am a little concerned about the limits. ...
0
votes
0answers
72 views

Unable to access packaged custom labels from outside the managed package

I am able access the custom labels created in my org, using Apex, but not the custom labels from a managed package installed in my org. The documentation does not have a specific example to access ...
0
votes
1answer
24 views

How to show a text label within a section column on page layouts?

I need to show a text label within a section column on page layout. I've created a separate section and new VF page. I need the text label to appear both on create and edit of the record.
0
votes
1answer
29 views

is it possible to store dynamic value in Custom Label like {!…}

I know custom label is used to store static text but would like to store tableau report link with dynamic Contact Id value or name. Issue is when I read it from VFP without controller then it does not ...
1
vote
0answers
129 views

Alternative to custom settings in salesforce

I have a problem statement where I need to store a list of some 40 Parent Objects Ids statically. Further, if any one of the Parent Object's child records goes higher then 45,000(which is calculated ...
15
votes
0answers
178 views

Custom Labels in Packages - Potential BUG in Winter 19 (Confirmed as Know Issue by Salesforce)

We have an unmanaged package using 167 custom labels to use the Translation Workbench in Salesforce and to be able to translate texts into different languages. Until now, all our custom labels have ...
6
votes
1answer
373 views

Winter 19 Custom Labels

Since Winter 19 is applied in our scratch org, we have the following message on ALL our custom labels directly referenced from custom lightning components. Example: {!$Label.c.Persons} $LABEL.C....
0
votes
1answer
18 views

Language Translation for Parameterised part in custom labels

I am using a custom label whose value is "Create Account : {0}" where {0} is replaced with account's record type. I have added translation for "Create Account" part and that is working fine. But the ...
2
votes
2answers
366 views

Is it possible to make text bold in a custom label?

Background We have a custom application which we need to support in multiple languages. Visualforce is our main UI framework. For internationalization we will use Custom Labels. One of the possible ...
2
votes
2answers
112 views

Are Custom Labels Cached?

There was a requirement to store some key value pairs that will be frequently accessed and the current setup is that is being stored in custom labels. I was wondering if there is any evidence of ...
0
votes
0answers
65 views

Custom label translation issue

I have a custom label Label.LoginForm_Error_Message having translation for different countries. This label has been used in Apex page to show custom error message country specific whenever there is a ...
1
vote
1answer
348 views

Custom Label does not work on Lightning Components

I'm using custom label on lightning components, but it always shows me English, and does not follow the user language. Someone knows what to do in this case? I've tried reference my custom label ...
3
votes
2answers
67 views

Replacing hard coded messages inside Lightning JS controller

I have existing code which contains upto 20 hard coded messages(info, error etc.) inside my lightning JS controller. I am confused whether to use custom labels or custom settings as part of code ...
1
vote
1answer
7 views

Casing in label names in Visualforce Page

I have two orgs with a page that uses custom labels and one works as you would expect it: {!$Label.MyLabel} And I think the old behavior is that on an org with a namespace it is changed to: {!$Label....
0
votes
1answer
56 views

Custom Label inconsistencies in Managed Packaged

We have two Orgs, DEV and SIT (SIT installed by managed package ), and both have namespaces. In SIT the dynamic reference to the custom labels do not work, but in the Dev org they work. Below is the ...
2
votes
0answers
213 views

Lightning Experience: Using custom labels inside HTML Editor

I have a Salesfoce Community and I wonder if is it possible using custom labels inside an HTML Editor component (Community Builder). I've tried it but the customlabel is not being compiled. Thanks!
1
vote
0answers
162 views

Dynamically fetch Custom Labels in Apex class

I need to dynamically fetch Custom Labels in Apex class, something like Get All Labels where name like 'a%' I see SOQL does not support querying Custom Labels and although I see Metadata API can be ...
2
votes
2answers
277 views

Custom Labels - naming conventions - best practices?

We're about to start refactoring a bunch of hard-coded text from a client's Lightning Components and Visualforce pages into Custom Labels so that they can support multi-language users. Unfortunately ...
1
vote
1answer
96 views

I18n URL in Lightning

Using CustomLabels, we are able to use the {!format($Label.myNamespace.myLabelName, v.myAttribute} in lightning component markup where $Label.myNamespace.myLabelName looks like: <?xml version="1.0"...
0
votes
0answers
134 views

Formatting parameterized custom label inside subject for Visualforce Email template

I'm trying to use the format() visualforce function to have a parameterized custom label as my Visualforce Email Template subject. This is my current code: <messaging:emailTemplate ...
4
votes
1answer
183 views

Are custom labels referenced only in Lightning Components automatically packaged?

This (not marked as delivered) idea Custom Label Auto Packaging in Lightning Components has a "Latest Comment from Salesforce" of: Farhan Tahir - 5 months ago This is coming in Spring'18!! ...
0
votes
1answer
296 views

Custom Labels and Error Messages

The Adding and Customizing Input Field Labels documentation says: When set, the label attribute will be used for component-level error messages, for example, when a field is required or must be ...
0
votes
2answers
546 views

Leading and trailing blank space in custom label are truncated

I have error messages that are in the form System.Label.MyLabel1 + 'some other dynamic string' + System.Label.MyLabel2. Issue is I must have a space each between these 3 components. When I put a ...
0
votes
1answer
403 views

Apex Page Language attribute - Dynamic Assignment - Strange Beahviour

Following scenario: A custom label has to be displayed in a rendered PDF (display in a VF Iframe). Now - it should display the specific custom label translation language found in a controller function ...
2
votes
1answer
119 views

Managed Package Patch: Is new label creation allowed

It's mentioned that addition of new artifacts is not allowed in the scope of patch changes for managed package. The question here is - does label creation considered to be an addition of new artifact? ...
0
votes
1answer
143 views

How to show error message under apex:inputtextarea

On my page visualforce page I have a few fields that on submit validation will run. For some reason the error is not displaying under the textarea but its working for other fields on my page. How can ...
0
votes
2answers
2k views

How to use custom label inside Soql query for Date Value

I am using Custom label inside soql query for Date values. But I am getting error. String startvalue=System.Label.Start_CloseDate; String endvalue=System.Label.End_CloseDate; List<...
3
votes
2answers
728 views

Salesforce Lightning - Custom Labels with Parameters

When creating custom labels, you can do the following in a Lightning component (Assuming salutation = "Hello, {0}"): {!format($Label.mySection.salutation, v.name)} What I would like to know, is how ...
2
votes
2answers
167 views

Packaging renaming of account object

We've renamed Account object using 'Rename Tabs and Labels' from Setup menu to Customer. Everything works fine. The problem appeared when we packed our application as managed package - after ...
4
votes
1answer
352 views

Namespace replaced while saving a lightning component

When I use a Custom Label in a Lightning Component of managed package (with custom namespace), Salesforce changes the file and saves the label with the default namespace. For example, I save $Label....
0
votes
2answers
347 views

Dynamic custom labels and ui:inputSelect

I need dynamically show drop down list with countries. My code: Controller: public with sharing class CountryCtrl { @AuraEnabled public static List<CountryUtils.CountryProperty> ...
4
votes
1answer
426 views

Packaging custom labels used in lightning helpers and controllers

So in our lightning code base we usually refer to labels from js helpers and controllers as the following (it's static reference, not dynamic one): $A.get("$Label.c....
3
votes
1answer
2k views

APEX: how to get Custom Label's text dynamically? [duplicate]

There is a way to get Custom Label statically in APEX as documented here System.Label.Label_Name Can I get this label without hardcoding Label_Name? What I've tried so far (and did not work) ...
4
votes
1answer
2k views

APEX: get a Custom Label translation in a certain language which is not equal to the current user's language?

Scenario with Custom Lables I've defined tons of custom labels in Salesforce setup in order to cleanly support translations for localized strings. This work great if the labels are used for UI ...
0
votes
2answers
483 views

Custom Label in a Custom Button (javascript)

I have a custom button that has a custom label: for the custom label of sharepointLink: the value has just like this: url.aspx But when clicking the custom button, it shows like this: Is it ...
4
votes
1answer
1k views

How to catch internal Salesforce error in APEX?

I have a condition where i have to get a list of valid custom label names in a list using which i can display those custom labels dynamically on the page. But whenever i am checking if the custom ...
0
votes
1answer
579 views

How to use Custom label in an onClick Javascript button?

Hii I need to use a custom label in my onClick javascript button. I am getting an error Field $Label.Label does not exist. Check spelling. Though I have already Created the Custom Label The ...
0
votes
1answer
342 views

How to create a Custom label(URL) in Sandbox that can be deployed to Prod?

I am referring to Logout Url in a Lightning component(in Sandbox which is specific to its own Org.). Is there a way I can make use of Custom Labels in Sandbox Org. to get to the logout URL? If yes, ...
0
votes
1answer
189 views

Workaround to avoid hardcoding the if condition parameters in apex trigger

I have a scenario to write a good number of validation rules on a custom object. As I have to check the name field value of a lookup field using lookupfield__r.name in my validation rule, I am ...
1
vote
1answer
691 views

How to split the delimiter of the custom label correctly

I have a custom label which is having value of a picklist field as " %a%%b%%c%". I want to check whether the choosing picklist value is in this custom label or not (to check both in code and workflow)....
1
vote
2answers
908 views

Custom labels and custom labels deployments

How to use custom labels in apex any syntax?? I have created more than 100 custom labels on my developer sandbox and added a translation text. when I create a change-set, add the custom labels to the ...
2
votes
2answers
2k views

How to add dynamic variable to custom label in lightning javascript helper class

I am using a custom label in lightning controller/helper as: $A.get("$Label.c.MaxCountProducts"); And the label has value as: Maximum Product(s) count {0} is exceeded. I want to dynamically ...