0

I`v made a neat JS link and implied it to a document library that adds a image to a document that that have the archive field on "yes".

the problem is that now the office documents doesn’t open via web (office web access).

=== this is the code that overriide and send the link to the documents ===

   return "<a style = 'color: black; text-decoration:none' href='" + url + "'>" + ctx.CurrentItem.FileLeafRef + "&nbsp;<img src='http://portalaviv/planning/Style%20Library/archivesign.png' alt='Archive Document' title='Archive Document'/></a>";
}
else {

    return "<a style = 'color: black; text-decoration:none'  href='" + url + "'>" + ctx.CurrentItem.FileLeafRef +  "</a>"; 

It worked return "" + ctx.CurrentItem.FileLeafRef + "";

2

Add a query Parameter to the url

ctx.CurrentItem.FileLeafRef + "?web=1" 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.