Stack Exchange Network

Stack Exchange network consists of 174 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]

The tag has no usage guidance.

1
vote
0answers
47 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 ...
14
votes
0answers
103 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
317 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
16 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
144 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
45 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
15 views

Is there any API to check where the custom labels is being referenced in Salesforce ORG?

we are using 5998 custom labels out of maximum limit of 6000. Manual approach of deleting one by one to find references will take more time. Is there a programmatic approach to find where the ...
0
votes
0answers
23 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
151 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
53 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
25 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 ...
1
vote
0answers
99 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
104 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
164 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
53 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
87 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
133 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
222 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
337 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
0answers
140 views

Live Agent Prechat form language translation not working

I am using a visualforce page as Pre-chat form. I have 3 fields (First Name, Last Name and Email) which I am referring from custom Labels for language translations. I have added trnasalations in ...
0
votes
0answers
166 views

Dynamic language attribute assignment on visualforce component

Following scenario: A visualforce page is full of custom labels which are rendered according to the language of the logged in user. In a portion of this page some controller variables should be ...
0
votes
1answer
224 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
100 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
88 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
1k 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
392 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
121 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 ...
3
votes
1answer
189 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
298 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
315 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
1k 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
1k 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
356 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
849 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
441 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
316 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
155 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
516 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
666 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
1k 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 ...
1
vote
1answer
52 views

Good location to store single value (API Key) which will be used on mulitple Visualforce pages

I've multiple Visualforce pages using Google Map, till now I am not using any Google Map Javascript API Key key while referencing the Google Map script. <script type="text/javascript" src="https://...
3
votes
0answers
459 views

Dynamic Custom Label in Javascript

Is it possible to retrieve custom labels dynamically in javascript? Works well: var labelTest = '{!JSENCODE($Label.MY_LABEL)}'; I need to do something like this: var text = 'MY_LABEL'; var ...
1
vote
0answers
77 views

Are Customer Created Custom Labels Visible in Managed Package Code

Quick question, I couldn't find this in the documentation. If you have a managed package with managed class or code are custom created labels visible? For instance, in managed VF page if you had {!$...
-1
votes
1answer
48 views

How to fetch the custom label by using variable instead of label name [duplicate]

Normally we fetched the label name by using label.labelname in apex code but i want to fetch the label name by using variable in apex code.Anyone have idea?
3
votes
2answers
602 views

How can I make a custom label display 'nothing'?

I have a series of custom labels on a Visualforce page. Not all of the custom labels are required for all languages. I need to be able to set the custom label to something that will not display ...
2
votes
2answers
208 views

Custom labels with placeholder in Visualforce

I'm using Custom Labels on a Visualforce page but those needs to contain a variable inside them, I'm used to it like this in Lightning: {!format($Label.c.myLabel, v.attribute1, v.attribute2)} Where $...
1
vote
4answers
811 views

How can we count number of custom labels in salesforce?

How can we count number of custom labels available in Apex class in Salesforce? Do we have any query for this ?
-1
votes
1answer
142 views

if user deactivate then assign his/ her case to another active queue member using trigger [closed]

I have created custom label and assign one hardcoded id for testing purpose how we can achieve this using trigger on user (after update event)
0
votes
0answers
46 views

How to use delimiter for picklist in validation rule

I have a validation rule to check if the country is not equal to "Romania" or "Turkey". I have entered all the country values in a custom label delimiting by ";". But it is not firing as expected. ...