Local resources need to be accessed from Javascript buttons - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
660  Points
Closed - Low Activity
Closed - Low Activity

Local resources need to be accessed from Javascript buttons

API

 I have tried to create a new custom button using javascript language. I wanted to import jQuery libraries to the js button. I have tried to use the following possibilites, but they did not work.

{!requireScript(URLFOR($Resource.jquery,'jquery.min.js'))}
result: Error: Field $Resource.jquery does not exist. Check spelling.

{!requireScript({!URLFOR($Resource.jquery,'jquery.min.js')})}
result: Error: Syntax error

{!requireScript({URLFOR($Resource.jquery,'jquery.min.js')})}
result: Error: Syntax error

The  jQuery file does exist and I have used it on custom Vf pages.

The only way I could import the script was using goggleapis, but I need to use local resources.
 {!requireScript("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js")}

Merge Idea · Flag

  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

No results found.

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.