+ Start a Discussion
chris alnerchris alner 

URL as a custom global variable

Hi there,

I'm trying to create some custom buttons that will point at a URL for an external admin interface and pass a user ID over. Currently we are pointing at a dev environment, but in the future we will deploy to live and I want to avoid having to update the URL across all the buttons one by one. Essentially I want to create a custom global variable for the URL so I can change it in one place and have the change replicated across all the cutom buttons. 

I can get the buttons to work with the full URL nd also getting the user ID - http://domain.com/user/{Contact.User_ID__c}/update?sid={!User.Session_ID}&apiendpoint={!API.Partner_Server_URL_50}&userid={!User.Id}

What I want is to have http://domain.com/user/ as the global variable. Howevere when I try to use a cutom label e.g. {!Label.Button_URL}, or try to have the URL as a field that I refference e.g. {User.Button_URL__c} I get a stale session error. Does anyone else have experience of working with URL's as a custom global variable? Any assitance is greatly apprciated! 
Best Answer chosen by chris alner
Ajay Nagar 7Ajay Nagar 7
Hi Chris,

Use Custom Settings to store base url.

Thanks
Ajay

All Answers

Ajay Nagar 7Ajay Nagar 7
Hi Chris,

Use Custom Settings to store base url.

Thanks
Ajay
This was selected as the best answer
chris alnerchris alner
Many Thanks Ajay, that's worked a treat!