You need to sign in to do that
Don't have an account?
Page redirect
Hello one and all,
I have a Visualforce page that I created as the landing page in my Partner Portal. I have populated the page with selected Opportunities based on the current logged in users id. All is working great there. I want to make the Opportunities links that open up the actual Opportunity, but not inside the Home page (wow that looks goofy!) ... I want it to open the Opportunity tab and display the record there.
Here is my sample code:
<apex:PageBlockTable value="{!ZeroThirty}" var="records" rowClasses="red1,red2">
<apex:column headerValue="Manufacturer Name">
<apex:outputLink value="/{!records.Id}">{!records.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!records.Contract_Owner__c}" headerValue="Contract Owner" />
<apex:column value="{!records.Amount}" headerValue="Amount" />
<apex:column value="{!records.CloseDate}" headerValue="Renwal Due By" />
</apex:pageBlockTable>
The way it is now, it opens up the opportunity record INSIDE the home page. I can open 5 different ones and they just keep layering on top of one another. How do I redirect them to the Opportunity tab passing in the ID of the record?
As always --> Thanks in advance
Have you tried target="_parent" in your <apex:outputLink> tag?
Hi S91084 ...
Yes, I did. I tried:
"_self"
"_blank"
"_parent"
"_top"
But none worked properly. The closest was the "_blank" which opens up a new tab to the Opportunity area, but I am hoping to replace the VF page with the Opportunity page instead of opening a new tab. The idea is that the user can switch back to the "Home" page using the tabs at the top. With "_blank" the user has two tabs open ...
I am at a loss. ? I am starting to think this is not possible to do. :(
Can you post your page code?
I trimmed out a lot of the excess, but here is the bulk of the visualforce page code (the pertaining portion is in red):
<apex:page showHeader="false" sidebar="false" standardController="Opportunity" tabStyle="Opportunity" extensions="getAllRecords">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<body>
<apex:form >
<div id="pageWrapper">
<div id="header">
<span id="headerWelcome">
<h5>
<p>Welcome Back {!$User.FirstName & ' ' & $User.LastName}!<br />
Todays Date: {!MONTH(TODAY())}/{!DAY(TODAY())}/{!YEAR(TODAY())}
</p>
</h5>
</span>
</div>
<div id="innerPage">
<div id="customContent">
<!-- ---------------------------- -->
<!-- ---- INSERT THEIR LOGO ----- -->
<!-- ---------------------------- -->
<div id="displayDiv">
<apex:variable var="imageVar" value="{!imageName}"/>
<apex:image url="{!URLFOR($Resource.Logos, imageVar)}"/>
</div>
<apex:pageBlock id="block1">
<script>
twistSection(document.getElementById('{!$Component.block1.zero30}').getElementsByTagName('img')[0])
</script>
<apex:tabPanel selectedTab="MaintenanceRenewals" id="theTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" width="100%">
<apex:tab label="Maintenance Renewals" name="MaintenanceRenewals" labelWidth="250px" >
<apex:pageBlockSection id="zero30" title="0-30 Days Maintenance Renewals" columns="1">
<apex:PageBlockTable value="{!ZeroThirty}" var="records" rowClasses="red1,red2">
<apex:column headerValue="Manufacturer Name">
<apex:outputLink target="URLFOR('//006/e')" value="/{!records.Id}">{!records.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!records.Contract_Owner__c}" headerValue="Contract Owner" />
<apex:column value="{!records.Amount}" headerValue="Amount" />
<apex:column value="{!records.CloseDate}" headerValue="Renwal Due By" />
</apex:pageBlockTable>
</apex:pageBlockSection>
<apex:pageBlockSection title="31-60 Days Maintenance Renewals" columns="1">
<apex:PageBlockTable value="{!ThirtySixty}" var="records" rowClasses="yellow1,yellow2">
<apex:column headerValue="Manufacturer Name">
<apex:outputLink target="URLFOR('//006/e')" value="/{!records.Id}">{!records.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!records.Contract_Owner__c}" headerValue="Contract Owner" />
<apex:column value="{!records.Amount}" headerValue="Amount" />
<apex:column value="{!records.CloseDate}" headerValue="Renwal Due By" />
</apex:pageBlockTable>
</apex:pageBlockSection>
<apex:pageBlockSection title="61 Days (or more) Maintenance Renewals" columns="1">
<apex:PageBlockTable value="{!OverSixty}" var="records" rowClasses="green1,green2">
<apex:column headerValue="Manufacturer Name">
<apex:outputLink target="URLFOR('//006/e')" value="/{!records.Id}">{!records.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!records.Contract_Owner__c}" headerValue="Contract Owner" />
<apex:column value="{!records.Amount}" headerValue="Amount" />
<apex:column value="{!records.CloseDate}" headerValue="Renwal Due By" />
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:tab>
</apex:tabPanel>
</apex:pageBlock>
</div>
</div>
</div>
</apex:form>
</body>
</html>
</apex:page>