function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

using static resource in javascript button

I do not know why static resource call via URLFOR seems not to be supported in javascript invoke button, whereas the function is available for use.Have anyone used another method to get the url of a static resource in javascript invoke button?


I found this resource while searching for the same issue.


I've yet to try it out. Please do take note that it is a hack for an unsupported function. It can break anytime.

I've noticed that if we copy the url and paste it there , it works, even tough the resource has changed and the link also. the number present in the link only point toward a version of the resource. If this number is set to 9999999999 , you will get the resource anyway, but the first resource, not the updated.
You can use {!REQUIRESCRIPT('/resource/your_js_static_resource')}