+ Start a Discussion
Pat VachonPat Vachon 

List Button URL won't work with community users due to URL encoding of forward slash

This URL works fine w/ my enterprise users but not so with my community users as they have "sales/" at the beginning of their relative URL. In theory this works, except the forward slash is being encoded to %2F. Does anyone know of a way to suppress/disable encoding the forward slash? If not, what is the next easiest way to implement this requirement of custom URLs that work with both enterprise and community users.

/{!IF( User.Profile="Sales (Part Comm)", "sales/" , "")}a1Y/e?
Have you tried using global variable like '{!$Site.SiteId}' in your onclick javascript code to see if you are in a community or in enterprise instance? It would be undefined in enterprise and should return some id in community.

Pat VachonPat Vachon
Er ... uh ... I'm not using javascript.

User-added image
Brian KoBrian Ko
Not sure if you figured it out yet but {!URLFOR($Site.Prefix)} works for me. Just put that in the beginning.

So my formula was:
&Name={!Account.Name}+" / "+{!Opportunity.Name}