+ Start a Discussion
Nethra RaghupathyNethra Raghupathy 

Insert Remote Site Setting from post install script

I have a lightning app which has the remote site settings dynamic.
So, is it a good practice to use metadataService.class (http://technome2.blogspot.com/2017/05/creating-remote-site-settings.html) in post-installation script to add remote site settings for the org?
Raj VakatiRaj Vakati
Its nor required always .. 

i can suggest you can do it as part of migration using change set or 
you can add them manually or update them manually 

or you can use even named credentials  

writing this type of code is not recommended 
Nethra RaghupathyNethra Raghupathy
Raj, For me I can't add remote site settings manually because the URL is changing based on the client deployment I make. To use named credentials also i should have the URL fixed right?
This is how my URL is, http://xxx-xx.<dynamic>.xx-xx-x.xxxxxxxx.xxx
dynamic section changes based on the client deployement.

please correct me if I'm wrong. 
Jamie JonesJamie Jones
You will find some great resources on packaging and package development on the Partner Community.

Ava EthaniAva Ethani
You can learn a lot from the internet all the things are available online on dfferent websites like Youtube. And for your convenience you can also open this developers community website Customers Satisfaction Survey (http://www.customerssatisfactionsurvey.com/)
Ava EthaniAva Ethani
I also find another great website for online learning for you check bellow
WalmartOne (http://walmartonelogin.org/)
jadun jdjadun jd
For fashion accessories and clothing, visit dollar general stores in the USA. You will satisfy after shopping at dollar general stores. Visit dgcustomerfirst com $100 gift card survey (https://dgcustomerfirst-com.com/) site for giving your valuable feedback and win $100.
denial gonjalvish 4denial gonjalvish 4
One that is quite common is to automate post package installation tasks such as ... That is to create the Remote Site Setting to ironically allow the native Apex code to call a .... script >. function createRemoteSite().
https://mcdvoice.today/ https://customersurvey.onl/ https://detroit-electric.co.uk/
myfestiv alsalesmyfestiv alsales
I actually have a shop and I sell merchandise what I DO have in stock and what Distributors have in stock..
deltanet (https://onesiti.com/)
Chuck BurtonChuck Burton
Your One-Stop-Shop for Professional Moving and storage Vancouver, Professional Movers, Furniture, Office and Long Distnace. Packing Services, Moving Supplies, Moving Bin Rental, Boxes & More. https://www.1promovingandshipping.com/