Skip to main content

We recently implemented a Partner Portal, but are having trouble embedding links in our templates to VF pages that work for both our internal users and our partner users.


What we are trying to do:



  1. Link to a VF page called “OpportunityTable”




  2. Be able to embed this link in a template that prepends the proper address whether the logged in user is a Partner or Internal user.



Here is what I’ve tried:


ATTEMPT #1


<a href="/apex/c__OpportunityTable"> 


Which generates the following URL:


<a href="https://buildrealty.force.com/apex/c__OpportunityTable" rel="nofollow" target="_blank" title="Link https//buildrealtyforcecom/apex/c__OpportunityTable">https:&#47;&#47;buildrealty&#46;force&#46;com/apex/c__OpportunityTable</a>


Results:


Partner User - “Under Construction” message is displayed

Internal User - Works Correctly


ATTEMPT #2


<a href="/partners/apex/c__OpportunityTable">


Which generates the following URL:


<a href="https://buildrealty.force.com/partners/apex/c__OpportunityTable" rel="nofollow" target="_blank" title="Link https//buildrealtyforcecom/partners/apex/c__OpportunityTable">https:&#47;&#47;buildrealty&#46;force&#46;com/partners/apex/c__OpportunityTable</a>

Results:


Partner User - Works Correctly

Internal User - “URL No Longer Exists” message is displayed

Almost solved…but not quite out of the woods yet.


ATTEMPT #3 (success but with unintended results)


<a href="partners/apex/c__OpportunityTable">


Which generates the following URL:


<b>https:&#47;&#47;buildrealty--c&#46;na20&#46;visual&#46;force&#46;com/apex/partners/apex/partners/apex/partners/apex/c__OpportunityTable</b>


Results:


Partner User - Works Correctly (kinda)*

Interal User - Works Correctly (kinda)*


The problem now is that the above template creates a longer and longer URL each time I click on it. Each time I click on the link it adds another “/apex/partners” into the middle of the URL. It keeps getting longer and longer…


Now I’m more confused than I was when I started!


Two ideas.



  1. If you are willing to override the Tab Action - you can simply pass the url: which will kick off the redirects you set up in Page Assignments and take the user to the correct place.








You could also explore the {{$Site}} global merge varialbe within your URL. I know this will prepend the correct community name, I’m just not sure what it will do in the Internal User context. Look for more information here: http://help.skuidify.com/m/11720/l/187263-global-merge-variables-functions



Good Luck.


Reply