So, I have a broken link due to an invalid express...
# general
c
So, I have a broken link due to an invalid expression in my formula. I assume that it's because {internalid} is not the correct field id? I am trying to get this formula to work to populate a Service Report attachment from the message fields.
b
probably want to share the text of your formula
a quick look suggests you are missing a quote in the beginning
c
Its on the pictures, they just got blurry when i uploaded them
is that betteR?
g
What type of saved search is this?
c
it's a customer saved search, but I'm try to grab the message fields attachments id. not the attachment to the customer.
g
I think that's too many joins.
Customer -> Message -> Files
files attached to the message is too far away from customer
c
I'
I'm sorry, I should be more specific - it's a case search.
Case -> communiction -> Message fields -> attachments
g
Yeah, still think the files are too far from the base record. You might have to start with a message saved search
b
copy and paste the text of your formula here
g
'<a href="<https://XXXXX.app.netsuite.com>'||{file.url}||'"target="_blank">'||{file.name}||'</a>'
This is an example of the formula (text) that I have on a sales order saved search. This will display the file name as a hyperlink in results for the files that are under the communications -> files subtab on a sales order
b
importantly @Gregory Jones has quotes around his anchor element
c
'<ahref=|{internalid}||'&amp;company='||{internalid}||' target="_blank">Service Reports </a>'
'<a href=<https://3491530.app.netsuite.com/app/common/entity/custjob.nl?id='||{internalid}||'&company='||{internalid}||'> target="_blank">Service Reports </a>'
k
Open a file link and use that as your base. You are trying to use the link I sent too literally
Gregory's link is using the same concept of concatenation, but is a different record type
b
the formula '<a href=|{internalid}||'&amp;company='||{internalid}||' target="_blank">Service Reports </a>' is a valid formula, it will probably generate a garbage link for a case search, but you shouldnt be getting an invalid expression from it
j
it at least needs some more quotes in it
c
@battk When I put quotes on it, it worked. It generated the customer link though, not the attachments I was hoping to get.
b
thats more what @KevinJ of Kansas was trying to tell you. You would need to figure out how urls work for attachments, and what parameters they accept
then find ways to fill in those parameters from the search results
i personally would expect approaching this from a different direction would be easier, do a message search to get your attachments and use the appropriate join to filter your results
a limitation of saved searches is that it only supports 1 level of joins in either direction. going from case to messages to attachments is too far, starting at message has better chances
c
The only issue with that is the data I need is only the case and on the attachment. not the messages. However, I could use the messages & do a join to the case from one end and another join to the attachment on the other end. That should work.