Is it possible to dynamically add the account id i...
# general
k
Is it possible to dynamically add the account id in a formula in a saved search? That way it doesn’t have to be changed when being bundled or deployed to a different account?
a
Well why do you want the account ID?
k
It’s a part of a link in the saved search
a
Aha so what I would do is put a relative link. E.x
<a href="/path/to/url" >text</a>
That should go to that path in the account it's in.
k
So it’s a suitelet URL. The compid is included in the url (it does not work unless the compid is there) and that’s why it needs to be dynamic. In production it would just be 12345 and in the sandboxes it would be 12345_sb1. Is there a way to get 12345_sb1 dynamically?
Or is there a way for the saved search to know what environment it is in?
a
I see. I don't know how to do it.
k
ok thanks anyways!
m
I don't believe you need the compid in the url. A relative link should work as long as the script id and deployment ids are the same in both enviroments. But use the textual script id instead of internal id
Example
/app/site/hosting/scriptlet.nl?script=customscript_xyz&deploy=customdeploy_xyz
k
thanks!!