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
devfredevfre 

Reg:Jquery to remove link from the output field

Need the syntax to use jquery to remove the link from the output field which is in the pageblocktable. Pls post it. Need it urgently

vishal@forcevishal@force

Would it be okay in your case to use an "apex:outputText" in place of "apex:outputField". If removal of link is the only concern, that should work for you!

devfredevfre

As i want this field while creating new records, i'm not able to use output text, as i have to use list.field__r.name bcoz it is the lookup field.

vishal@forcevishal@force

Can you please share your page code here?

devfredevfre

<apex:pageblocktable>

<apex:column headerValue="test" style="width:140px;text-align:center;"  headerClass="centertext" id="testName">
  <apex:outputfield value="{!list.obj.field__c}"  style="width:180px;" >
   </apex:outputfield> 
  </apex:column></apex:pageblocktable>

vishal@forcevishal@force

I am not sure why can't you use outputText here.

 

Anyway try this:

 

 

  <apex:outputfield value="{!list.obj.field__c}"  style="width:180px; text-decoration: none;" >

devfredevfre

hi this text-decoration is not working.. if i'm using output text, then in that table only id is displaying... so suggest how to overcome

vishal@forcevishal@force

Oh, you meant that.

 

In reference fields, you have to explicitly  specify the reference field you want to display in outputtext.

 

Try this :

 

<apex:outputfield value="{!list.obj.field__r.Name}"  style="width:180px" >

devfredevfre

ho, i used that only.. but it is showing error as attempt  to de-reference a null object