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
RbnRbn 

help on Apex:outputLink

 

Hi....

 

My below code doesnot works in the Page.

 

Throws an error:Content cannot be displayed: Invalid parameter for function URLFOR

 

 

<apex:outputLink value="{!URLFOR($Action.NoteAndAttachment.view, tas.id)}" style="font-weight:bold" target="_blank" >View</apex:outputLink>

 

Thanks in Advance

bob_buzzardbob_buzzard

What is tas?  Is it an instance of a record?

bob_buzzardbob_buzzard

Actually, that doesn't matter.  According to the help, NoteAndAttachment is not supported for view.

 

From: http://login.salesforce.com/help/doc/en/dev_action_values.htm

 

  • Activity
  • Ad group
  • Asset
  • Campaign
  • Campaign member
  • Case
  • Contact
  • Contract
  • Event
  • Google campaign
  • Keyword
  • Lead
  • Opportunity
  • Opportunity product
  • Product
  • Search phrase
  • SFGA version
  • Solution
  • Text ad
  • Custom objects
RbnRbn

Thanks bob for the quick reply.

 

i have notes and attachment section in a page where all the note & Attachment related to accounts and contats gets rolled up.

 

But i want the delete,edit and view hyperlink  functionality under Action Column.

 

Yes( tas) is the instance of a record.

KodiKodi

Hi,

 

if u want use outputlink has NotesAndAttachment means below code,

 

<apex:pageBlockTable title="File Attachment" value="{!modelList}" var="mod" rendered="{!t}" columnsWidth="10%,80%">

<apex:column headerValue=" File Name ">
<apex:outputLink value="{!URLFOR($Action.Attachment.Download, mod.Id)}">{!mod.Name}</apex:outputLink>

</apex:column>

<apex:column headerValue="Delete File" >
<apex:Commandlink action="{!Remove}" value="Remove" onclick="ref();">
<apex:param value="{!mod.id}" assignTo="{!aid}" name="aaid"/>
</apex:CommandLink>

</apex:column>

</apex:pageBlockTable>

 

the table will be display attachment and remove link.

 

this code controller,

 

 modellist=[select id,name,ContentType,OwnerId,ParentId from Attachment where ParentId=:app.Id];