I'm throwing together a POC to see how difficult it will be to create custom Content Blocks in house. I've followed the installation instructions here (I think):


and created a very simple app using heroku:

  <script src="blocksdk.js"></script>
  function myFunction(clicked_value) {
    var sdk = new window.sfdc.BlockSDK();
    sdk.setContent(clicked_value, function (content) { 
        console.log('Content Set');
//        sdk.setSuperContent(clicked_value, function (setContent) { });


MyDate: <input type="text" id="mydate" onfocusout="myFunction(this.value)"/>

I'm testing this using the heroku Block Tester App:


In the console I'm seeing clicked_value and 'Ran', but setContent doesn't seem to be doing anything. I know that setContent is running (I've tested it by amending the underlying code).

So I'm stuck with not knowing what I've done wrong, can anyone see anything I'm missing in my code?

  • It looks like this isn't a problem with my code as I've copied the sample code from here: github.com/tbesluau/sampleblock and I'm facing the same issue, the functions are all running, but the content isn't being updated
    – Blujay
    Jan 16 '19 at 14:22

You need to use https for the blocktester and widget URLs

  • thanks just adding the s to http worked for me
    – garek007
    May 27 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.