There is custom button in Account object to redirect to Case recordtype selection page. The custom button URL is


But in community,the same custom button URL is not working and below error is coming

https://myorg.cs6.force.com/CommunityName is under construction

The button URL is having community name in it. Given below is the URL copied from community browser address bar:


Can anyone please advise, how to make custom url work both in sandbox and community.


I had the same issue not long ago. This "extra" bit Salesforce adds to the URL broke lots of buttons in my application. The solution was to avoid hardcoded links on the buttons, but I think you want to redirect to the record type change page.

With communities I think you are better off using a OnClick JavaScript that checks the user's profile before redirecting. If it is a community user, then redirect to the URL which contains the CommunityName, otherwise just redirect to the "normal" Salesforce URL.


I think this article would help you out:


  • If the article does in fact answer the question, please cite the relevant content here. Links can break over time, and a good answer should stand on its own even if each link goes dead. – Adrian Larson Apr 21 '17 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.