function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Orn IngvarOrn Ingvar 

Outputlink in Visualforce page used as a console component not working in chrome

Hi,

 

I created a visualforce page which I use as a cloud component to display all cases that belong to an account. Its pretty simple and it works fine in Firefox but in Chrome I'm unable to get the links to work with the console. The chrome developer console gives an error : srcUp is not defined

 

My Page :

<apex:page standardController="Contact" extensions="VF_AccountCaseOverview" showHeader="false" sidebar="false">
	<apex:form >
        <apex:pageBlock id="caseOverViewPageBlock" >        	
            <apex:pageBlockTable value="{!CasesForConsumerAccountMembers}" var="cas">
        		<apex:column headerValue="Case Number">
                    <apex:outputLink id="casid" value="/{!cas.Id}?isdtp=vw" target="_parent">{!cas.CaseNumber}</apex:outputLink>
                </apex:column>        
                <apex:column headerValue="Contact">
                    <apex:outputLink id="conid" value="/{!cas.ContactId}" target="_parent">{!cas.Contact.Name}</apex:outputLink>
                </apex:column>                                        
                <apex:column headerValue="Subject" value="{!cas.Subject}"></apex:column>
                <apex:column headerValue="Record Type" value="{!cas.RecordType.Name}"></apex:column>
                <apex:column headerValue="Date/Time Opened" value="{!cas.CreatedDate}"></apex:column>
                <apex:column headerValue="Last Modified Date/Time" value="{!cas.LastModifiedDate}"></apex:column> 
                <apex:column headerValue="Owner" value="{!cas.Owner.Name}"></apex:column>
                <apex:column headerValue="Status" value="{!cas.Status}"></apex:column>              
           </apex:pageBlockTable> 
  		</apex:pageBlock>   		       
    </apex:form>
</apex:page>

Notice that I have one link with the ?isdtp=vw but it seems to make no difference and I've tried both with and without it. 

 

Controller :

public with sharing class VF_AccountCaseOverview {
	
	private final Contact con;
	public list<Case> caseLst {get; set;} 
	
	public VF_AccountCaseOverview(ApexPages.StandardController stdController){
		this.con = (Contact)stdController.getRecord();
		Contact cont = [Select Id, AccountId, kennitala__c from Contact WHERE Id =: con.Id];		
		List<Contact> conList = [Select Id, FirstName, LastName, kennitala__c FROM Contact 
		 							WHERE AccountId =: cont.AccountId];	
		 					
		List<Id> idList = new List<Id>();
		
		for (Contact c : conList)
		{
			idList.add(c.Id);
		}
		caseLst = [SELECT Id, ContactId, Contact.Name, AccountId, CaseNumber, Subject, RecordType.Name, CreatedDate, LastModifiedDate, Owner.Name, Status 
							FROM Case 
							WHERE ContactId in :idList
							ORDER BY CaseNumber DESC];
	}
					
	public Case[] getCasesForConsumerAccountMembers(){
		return caseLst;
	}
}

 When I click the Case Number or Contact Name in Firefox it displays in a tab which i what I want but nothing happens in Chrome except this srcUp is not defined error. The strange thing is that I have another Visualforce page which is almost exactly the same displaying a list of service the customer has using almost the exact same code and that works fine in both browsers.

 

Any help appreciated. 

Thanks

Orn

 

Best Answer chosen by Admin (Salesforce Developers) 
kiranmutturukiranmutturu

better replace that output link with html <a href=""> and try..... if you r working in service cloud there are some issues based on browsers....

All Answers

kiranmutturukiranmutturu

better replace that output link with html <a href=""> and try..... if you r working in service cloud there are some issues based on browsers....

This was selected as the best answer
Orn IngvarOrn Ingvar

Thanks Kiran,

 

That works in both Chrome and Firefox but I'm unable to open it within the service cloud console but I guess opening the link in a new tab will have to do for now.

 

Örn

kiranmutturukiranmutturu

so for that use onclick =" window.open()".. like this...

Orn IngvarOrn Ingvar

When I use that it opens in the frame where my visualforce page is displayed which is not what I want. I'm using target="_blank" to force it to open in a new browser tab which works for me even if its not my preferred choice.

 

Thanks again

Örn

sivaextsivaext

Hi

 

in your system the deafult browser and you working browser both are different.

 

you can try with other target options like "_parent", or "_self"