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

How can we manage to update the endpoint URL while deploying from sandbox to production environment? Can we do it using change sets? If not, then what are the other ways to accomplish this?
We know that, in production environment, we cannot make changes to a class (which contains the endpoint URL). If we are trying to deploy through CHANGE SETS, the same endpoint URL will be copied to production. Now, I want to understand that, when we use www.abc.com in sandbox but while deploying it to production, the URL should change to www.xyz.com because xyz is the main url for the webservice and we are using abc URL for testing purposes.
Can we do it using custom label?
Can we do it using custom label?
I think you can use Names Credential to store your username/password/Endpoints related information rather then hard coding the same in class.
You can find more details on below link
https://help.salesforce.com/articleView?id=named_credentials_about.htm&type=0
Further you can also store the endpoint in custom label also and refer that custom label in your class.
Using these option you can simply updated endpoints in production without any code change.
Thanks
Arpit