-
-
Save AdityaPavanVempati/d4cf86fc53697f982d5a to your computer and use it in GitHub Desktop.
While clicking the button an Apex ( googleUrlShortener ) class should come and perform the operation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Behavior Execute JavaScript | |
onClickJavaScript: | |
{!REQUIRESCRIPT( "/soap/ajax/35.0/connection.js" )} | |
{!REQUIRESCRIPT( "/soap/ajax/35.0/apex.js" )} | |
var obj = { | |
"longURL" :"{!Bookmark__c.URL__c}", | |
"bookmarkId" :"{!Bookmark__c.Id}", | |
}; | |
sforce.apex.execute( "GoogleUrlShortener", "shortenURL", obj ); | |
location.reload(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment