Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Switch ON Button - CloudBit
{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/36.0/apex.js")}
var obj = {
"percent" : 100,
"duration" : -1,
"recId" : "{!LittleBit__c.Id}"
};
sforce.apex.execute( "CloudBit" , "toggle" , obj );
location.reload();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment