Hello everyone, I’m getting stumped on a problem h...
# general
j
Hello everyone, I’m getting stumped on a problem here. Maybe I can get some education from someone smarter than me. We have a process where an external user is accessing an external SL to approve vendor bills. Our vendor bills often have multiple file attachments. The external SL is a simple sub list of those bills, where each bill is one line within the sl. I need to add a column or some sort of feature where I’m able to easily access multiple attachments per bill. How would you approach this? I have successfully created a saved search that shows a link to an attachment if there is only one attachment, of course if there are multiple attachments, I see duplicate rows of the same bill. My goal is to be a little more sophisticated and show a link to multiple attachments or multiple links within one row to avoid duplicate rows. Please educate me. Thank you.
j
The way I’ve done this before is to leverage the Formula(HTML) type and create a little embedded script in that column, for example with a clickable link that replaces the contents of a <div> or <span> with the response from a Suitelet callback.
Copy code
'<div id="row_' || {internalid} || '" style="color: #666666; cursor: pointer; margin-top: 4px; overflow: hidden;" onclick="jQuery(''#bill_row_' || {internalid} || ''').html(''loading...''); jQuery.get(''/app/site/hosting/scriptlet.nl?script=420&deploy=1&tx_id=' || {internalid} || ''').done(function(data){jQuery(''#bill_row_' || {internalid} || ''').html(data);});">[show attachments]</div>'
something like this as the formula in the saved search
then write a suitelet that does the work of looking up the attachments, and returning nicely formatted HTML that you can then show in your search.