cd /news/developer-tools/javascriptlets-execute-a-smartobject… · home topics developer-tools article
[ARTICLE · art-10238] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Javascriptlets- Execute a SmartObject in Designer.js

This file provides a JavaScript bookmarklet code snippet designed to execute a SmartObject within the Designer.js application. The code extracts a GUID from the URL's hash parameters and inserts an iframe into the page, loading a specific form with that SmartObject's identifier. The snippet also includes a "close" link to remove the inserted iframe from the interface.

read1 min views22 publishedJun 25, 2024

Javascriptlets- Execute a SmartObject in Designer.js

  This file contains hidden or 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

Show hidden characters
javascript: ( function(){

    /*What you want to do goes here */

    alert(window.location);

})();

For SmartObject execution:

javascript:(function(){  

    let urlParams = new URLSearchParams(window.location.hash);

    $(".lyt-explorer-maincontent").after('<div><a onclick="$(this).parent().remove()">close</a><br/><iframe src="'

     + window.location.origin +  '/Management/Runtime/Form.aspx?_ID=2ae83f85-6336-49f1-a9e5-fe78b220f6c4&smartobjectguid=' 

     + urlParams.get("guid") + '"  height="400px" width="100%"></iframe></div>' );

})();
── more in #developer-tools 4 stories · sorted by recency
── more on @smartobject 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/javascriptlets-execu…] indexed:0 read:1min 2024-06-25 ·