We usually update custom labels from UI. After sandbox refresh, we update all custom labels so that these don't point to production URLs or values.
By using Metadata API, we can write automated apex script through which we can update all custom labels.
You can either download Metadata API WSDL from Salesforce and generate apex class by clicking on Generate from WSDL button.
Or you can download the MetadataService class from below link:
MetadataService.cls
I have created 2 separate static methods, one for creating new custom label and another for updating existing custom label. Below is class code:
Now by running below code in execute anonymous in developer console, you can create custom label:
MetadataAPIUtility.createCustomLabel('SFDC_Blog_URL','My test label from metadata api','en_US','http://www.sfdcstuff.com/',false);
You have to specify custom label values as a parameters in static method.
In order to update custom label, execute below code:
MetadataAPIUtility.updateCustomLabel('SFDC_Blog_URL','My test label from metadata api','en_US','https://www.sfdcstuff.com/search/label/Lightning',false);
Hope this will help!!
By using Metadata API, we can write automated apex script through which we can update all custom labels.
You can either download Metadata API WSDL from Salesforce and generate apex class by clicking on Generate from WSDL button.
Or you can download the MetadataService class from below link:
MetadataService.cls
I have created 2 separate static methods, one for creating new custom label and another for updating existing custom label. Below is class code:
Now by running below code in execute anonymous in developer console, you can create custom label:
MetadataAPIUtility.createCustomLabel('SFDC_Blog_URL','My test label from metadata api','en_US','http://www.sfdcstuff.com/',false);
You have to specify custom label values as a parameters in static method.
In order to update custom label, execute below code:
MetadataAPIUtility.updateCustomLabel('SFDC_Blog_URL','My test label from metadata api','en_US','https://www.sfdcstuff.com/search/label/Lightning',false);
Hope this will help!!
Useful blog.
ReplyDeleteSalesforce Training Chennai
Big data is a term that describes the large volume of data – both structured and unstructured – that inundates a business on a day-to-day basis. big data projects for students But it’s not the amount of data that’s important. Project Center in Chennai It’s what organizations do with the data that matters. Big data can be analyzed for insights that lead to better decisions and strategic business moves.
DeleteSpring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Corporate TRaining Spring Framework the authors explore the idea of using Java in Big Data platforms.
Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
ReplyDeleteThanks for sharing the information
Thanks for sharing the information
Salesforce training in Hyderabad
Salesforce training in Hitech city
ReplyDeleteNice post keep do posting The Info was too good
Devops ONline Training
IT training instiutute
Thanks for sharing the information
Always so interesting to visit your site.What a great info, thank you for sharing. this will help me so much in my learning Custom Made Patches
ReplyDeletethe statistics are used well in this blog.
ReplyDeleteSalesforce Training In Chennai
This concept is a good way to enhance the knowledge.thanks for sharing. please keep it up salesforce Online Training Bangalore
ReplyDeleteGreat blog. It is simply innovative and useful.
ReplyDeleteIts pretty good and well noted. All your points are very useful.
salesforce training in chennai
salesforce course in chennai
salesforce training institute in chennai
salesforce training in bangalore
salesforce training institute in bangalore
salesforce course in bangalore
Thanks for posting this article it has really a good content.
ReplyDeleteSpoken English Classes in Chennai
Spoken English in Chennai
German Classes in Chennai
TOEFL Coaching in Chennai
IELTS Coaching in Chennai
spanish language in chennai
Spoken English Classes in Velachery
Spoken English Classes in Tambaram
A good blog for the people who really needs information about this.
ReplyDeleteGood work keep it up.
TOEFL Coaching in Chennai
TOEFL Classes in Chennai
German Classes in Chennai
IELTS Coaching in Chennai
Japanese Classes in Chennai
spanish language in chennai
TOEFL Coaching in OMR
TOEFL Coaching in Porur
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeletepayrollmanagementservice
Article submission sites
I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. relojes personalizados con foto
ReplyDeleteReally an awesome post for every one.
ReplyDeleteGerman Classes in Chennai
German Language Classes in Chennai
IELTS Coaching centre in Chennai
TOEFL Coaching in Chennai
French Classes in Chennai
pearson vue
German Language Classes in Chennai
German Courses in Chennai
Hey! great post you shared. It was amazing to read whole new update also want to add more about custom lables here for you. It is good to know about new things.
ReplyDeleteThis is good info. Any idea on how to insert/update Custom Label Translations?
ReplyDeleteReally a awesome blog for the freshers. Thanks for posting the information.
ReplyDeletebusiness card price in india
online paper bag printing india
desktop rental in chennai
macbook for rent in chennai
online company registration in india
company registration consultants in india
Nice informative blog, it shares more intresting information. This blog is useful to me.
ReplyDeleteDevOps Training in Bangalore
Best DevOps Training in Bangalore
DevOps Course in Bangalore
DevOps Training Bangalore
DevOps Training Institutes in Bangalore
DevOps Training in btm
Best DevOps Training in Chennai
DevOps Training institute in Chennai
Spoken English Classes in Bangalore
ielts coaching in bangalore
The blog which you have shared is more creative... Waiting for your upcoming data...
ReplyDeletePython Training in Chennai
Python course in Chennai
Python Training
Best Python Training Institute in Chennai
Python training in vadapalani
Python training in porur
Hadoop Training in Chennai
Android Training in Chennai
Big data training in chennai
JAVA Training in Chennai
Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. custom embroidered patches
ReplyDeleteThe blog is very clearly explained.The programs used to explain the content is so good. Keep sharing more blogs like this.
ReplyDeleteIELTS Coaching in chennai
German Classes in Chennai
GRE Coaching Classes in Chennai
TOEFL Coaching in Chennai
spoken english classes in chennai | Communication training
Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. create your own bag
ReplyDeleteThose that are left in the middle will be good employees, who lack sparkle and energy but with some extra training and development could really make your company fly. Salesforce training in Hyderabad
ReplyDeleteA debt of gratitude is in order for such an extraordinary post and the audit, I am completely inspired! Keep stuff like this coming. get more info
ReplyDeleteThank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. custom made patches
ReplyDeleteI’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... custom made iron on patches
ReplyDeleteI really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. Custom chenille patches
ReplyDeleteI have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites blog site list and will be checking back soon. Please check out my site as well and let me know what you think. visto canadense
ReplyDeleteThis is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here! new zealand eta
ReplyDeleteA debt of gratitude is in order for the tips folks. They were all incredible. I have been having issues with being fat both rationally and physically. On account of you all I have been indicating enhancements. Do post more. SEO expert Singapore
ReplyDeleteEverything several evaluations about it and today I expected to see it again staggering how it is completely made. https://vograce.com
ReplyDeleteI’ve been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before. this website
ReplyDeleteHey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. visit this site
ReplyDeletethanks for this usefull article, waiting for this article like this again. visa para canadá
ReplyDeleteExcellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. ಭಾರತ ವೀಸಾ ಅರ್ಜಿ
ReplyDeleteVery informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. nzeta
ReplyDeleteIt was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. visit this site
ReplyDeleteair jordan
ReplyDeletebape hoodie
kobe byrant shoes
hermes birkin
yeezy shoes
Watch and Download world's famous Turkish action drama Kurulus Osman Season 3 in English on link below
ReplyDelete👇
Kurulus Osman Season 3
Kurulus Osman Season 3 Episode 1
On link below
Kurulus Osman Season 3 Episode 1
Crypto trading course
Join on link below
Crypto quantum leap
YouTube course
Be a professional YouTuber and start your carrier
Tube Mastery and Monetization by matt
Best product for tooth pain ,
Cavity ,
Tooth decay ,
And other oral issues
Need of every home
With discount
And digistore money back guarantee
Steel Bite Pro
What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. !!!
ReplyDeleteReal Estate CRM