I have created a Custom setting as follows
Label: MyDomainURL
API Name: MyDomainURL__c
Visibility: 'Public'
Setting Type: 'List'
Custom Field: MyURL__c
I have referenced this in my Apex test class
MyDomainURL__c custsetting = new MyDomainURL__c();
custsetting .Name = 'MyDomainURL';
custsetting .MyURL__c = 'https://galaxy--sb2.csxx.my.salesforce.com/';
insert custsetting ;
This is in my sandbox. When i deploy to production, MyURL__c will change.
Is there a better way to re-write the above code to avoid hard coding setting.Name and setting.MyURL__C and getting these values dynamically.
Thanks!