Is it possible to pass part of the result search f...
# suitescript
a
Is it possible to pass part of the result search formula to a js function? something like this:
Copy code
'<a href="${domain('message',||{messagesto.internalid}||)}">'
b
you might be able to use a template literal (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in suitescript 2.1
otherwise you would probably be better off calling the function in suitescript and hardcoding its value in the formula
a
@battk thanks the function is in suitescript and outside the formula, I just want to pass {messagesto.internalid} to the function I have tried
${}
but it seems doesn't work with search formula
b
not how formulas work
formulas are fragments of sql
you cant use javascript there
im guessing you are trying to create a link to a message
so hardcode the path of the url (and part of the query) into your formula and concat the internal id to complete the query of the url