You need to sign in to do that
Don't have an account?

Create Custom Labels from apex code
Hi All,
I need to create hundreds of custom labels.
I have these labels in properties file as below.
UserName=User Name
Password=Password
Can we create them using apex code or we need to create them one by one from App Setup -> Custom Labels -> New Custom Label ?
Could anyone please help me on this
Thanks.
Hi,
From what I understand you want to actually create the Custom Label within Apex.
E.g. insert new Label(Name='test', Value='test');
As far as I know this isn't possible directly from Apex - you would either need to create the Labels manually or use a Custom Setting...
James
All Answers
https://sites.google.com/site/infallibletechie/how-to-use-custom-labels-in-visualforce-page-and-apex-class
Check this!!!
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
SFDC Site
If this post is your solution, kindly mark this as the solution.
I have an idea on how to create custom labels manually but am asking for through apex code how can we achieve this.
Thanks.
Check this
https://sites.google.com/site/infallibletechie/dynamic-creation-of-outputlabel
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
SFDC Site
If this post is your solution, kindly mark this as the solution.
Hi,
From what I understand you want to actually create the Custom Label within Apex.
E.g. insert new Label(Name='test', Value='test');
As far as I know this isn't possible directly from Apex - you would either need to create the Labels manually or use a Custom Setting...
James