How to get Downloadable link of Excel sheet for record producer in service portal for non admins

patil_p
Kilo Contributor

Hi All,

 

I have a requirement that,

In the description of record producer after clicking on "Template" the excel sheet should get download.

I have given the try making use of insert link but that is only working for "admins" and not for "non admins" as "sys_attachment" table in there in the URL,

At the same time we don't want to give access of "sys_attachment" table for non admins

Attaching some screenshots,

following as you can see, "template" on click of that, excel sheet should get download for non admins

patil_p_0-1697192475959.png

 

and following is the way I added link in record producer using insert link option in description.

patil_p_1-1697192762251.png

 

3 REPLIES 3

Shruti
Mega Sage
Mega Sage

Hi,

Try to create ACL on sys_attachment table for non admins to access particular attachment 

Use Sys_id of attachment record in the condition

Shruti_0-1697196918754.png

 

swathisarang98
Giga Sage
Giga Sage

Hi @patil_p ,

 

You can create a widget where you can mention the sys id for the attachment and map this widget to any new field with type as custom ..once the user clicks on hyperlink, it will download the attachment.

 

Widget html body,

<div>
 <p> <b><font color="black">Please fill the excel template and attach it to this form.
 </font> </b></p> 
  <a href="/sys_attachment.do?sys_id=3d8efb3997df2910a5587cfe2153af72" target ="_blank"><font color="blue">Click Here</font>
  </a><font color="black"> <strong>to download the template </strong></font>
</div>

Field with type as custom:

Custom field.PNG

 

End Result:

end result.PNG

 

Please check and Mark Helpful and Correct if it really helps you.

Regards,

Swathi Sarang

 

Danish Bhairag2
Tera Sage
Tera Sage

Hi @patil_p ,

 

OOTB non admin users don't have access to attachment table. So in order to enable for non admin users to download the attachment from the link , you need to make that specific  attachment read only to the non admin users having certain role.

 

  • The above thing can be achieved by creating a Read Only ACL on sys_attachment table.
  • Select the appropriate role which non admin users have
  • Lastly in the condition select the specific sys Id of the attachment for which u will be creating the link to. This will only make that attachment accessible to the non admin users.

Mark my answer helpful & accepted if it helps you resolve your query.

 

Thanks,

Danish