Override Attachment Object?

Matt SonesMatt Sones ✭✭
edited February 2017 in Questions
Is there a way to override the Attachment View action?

I created the skuid page, the page assignment and the VF wrapper. But there doesn't seem to be a way to tell salesforce to use my VF page instead of the standard attachment detail page. I've got to avoid sending folks into the scary world of plain SFDC.

Comments

  • Rob HatchRob Hatch 🛠️ 
    edited September 2016
    This is probably not a satisfactory answer,  but you can work to have all your attachment links go directly to your skuid page,  rather than going to the salesforce record ID.  If you are trying to avoid the Salesforce UI entirely - then probably everything is in your control.  We also often don't ever let users see the attachment detail page - we surface all the necessary data into an attachemnts table - and override all links so they go directly to the file itself using somthing like "/servlet/servlet.FileDownload?file={{{Id}}}"
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Makes sense. Thanks, Rob.
  • Jason CJason C ✭✭
    edited September 2016
    Hi Rob,

    I'm trying to accomplish the same thing but I'm still getting the default Salesforce file detail page when I click on the link instead of the file download. I have a template field with the following:

    <a href="/servlet/servlet.FileDownload?file={{{Id}}}" target="_blank">{{Name}}</a>

    Is there somewhere else I need to override the link behavior?? 

  • Rob HatchRob Hatch 🛠️ 
    edited September 2016
    The Name field needs to be wrapped in {{{Triple Braces}}}.    When you wrap it in double braces,  the link is still active. You just want the data in this case so that the link is provided by the a href.  That is provided by triple braces. 
  • Jason CJason C ✭✭
    edited November 2015
    Thanks Rob, Completely missed that.
Sign In or Register to comment.