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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The tag has no usage guidance.

1
vote
1answer
37 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
36 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
19 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
24 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!
0
votes
0answers
34 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
54 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
32 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
44 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
91 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
115 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
136 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
113 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
109 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
122 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 ...
1
vote
1answer
90 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
61 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
931 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
237 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
88 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
114 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
258 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
196 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
680 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
742 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
188 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 ...
3
votes
1answer
591 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
345 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
215 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
121 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
425 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
417 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
856 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
413 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
71 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
41 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
460 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
164 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
665 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
89 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
37 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. ...
1
vote
1answer
113 views

Populate a HTML placeholder with a Custom Label

I'm building a Pre-form Chat on a Visualforce page, but the problem is, the website gonna be multilingual, so now i need to put a Custom Label as a placeholder, but I'm using html instead of apex ...
0
votes
0answers
155 views

How to use custom label in batch class

How do I create label for record types mentioned in the code ? This is because, record types will get added or change in name of it and hence decided to go for the custom labels but how do I create ...
0
votes
1answer
100 views

How to place an IF statement in a title attribute on a Visualforce page

I have a syntax issue with this line of code: <apex:sectionHeader title="{!if(!PP_IsOwner,!$Label.D1,!$Label.D2)} /> Here is the relevant line of code from the controller: public Boolean ...
5
votes
2answers
785 views

Lightning components: Custom label translation not working in managed package

I'm developing a lightning component as part of managed package. Translations work when I'm inside the development org, but I get only English values when using the component in my test org where I ...
2
votes
1answer
723 views

Deployment of translations of custom labels using ANT

We have a very large number of translations for custom labels. could any one guide me in how to create package.xml for deploying translations into new sandbox using Ant. I retrieved translation data ...
7
votes
5answers
2k views

How to see Translation for Custom Label in Lightning Component?

I have a Lightning Community for different countries. Have components w/ custom labels(Language : English). Labels have a German Translations(German, active). I use labels in tags: etc. I see only ...
0
votes
2answers
161 views

cover shedulable batch class in test class [closed]

//In this a custom label SFA_AMERICAS_BATCH_JOB_FILTER how to cover in test class global class SFA_ScheduleDailyAccountBatchForAmerica implements Schedulable { global void execute(...
1
vote
4answers
2k views

how to add multiple values to a custom label and check if string exist or not

I have more than 1 string values which I would like to store to a custom label and write if condition to see if the string value exist in custom label or not. for example : is it possible to add "Car,...