{"slug": "javascriptlets-execute-a-smartobject-in-designer-js", "title": "Javascriptlets- Execute a SmartObject in Designer.js", "summary": "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.", "body_md": "Javascriptlets- Execute a SmartObject in Designer.js\n\n      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.\n      \nLearn more about bidirectional Unicode characters\n\n \n    Show hidden characters\n\njavascript: ( function(){\n\n    /*What you want to do goes here */\n\n    alert(window.location);\n\n})();\n\nFor SmartObject execution:\n\njavascript:(function(){  \n\n    let urlParams = new URLSearchParams(window.location.hash);\n\n    $(\".lyt-explorer-maincontent\").after('<div><a onclick=\"$(this).parent().remove()\">close</a><br/><iframe src=\"'\n\n     + window.location.origin +  '/Management/Runtime/Form.aspx?_ID=2ae83f85-6336-49f1-a9e5-fe78b220f6c4&smartobjectguid=' \n\n     + urlParams.get(\"guid\") + '\"  height=\"400px\" width=\"100%\"></iframe></div>' );\n\n})();", "url": "https://wpnews.pro/news/javascriptlets-execute-a-smartobject-in-designer-js", "canonical_source": "https://gist.github.com/markman623/5c6e71bb1fb30a41853d6373dfc256b8", "published_at": "2024-06-25 14:51:30+00:00", "updated_at": "2026-05-22 23:06:51.536556+00:00", "lang": "en", "topics": ["developer-tools", "enterprise-software"], "entities": ["SmartObject", "Designer.js"], "alternates": {"html": "https://wpnews.pro/news/javascriptlets-execute-a-smartobject-in-designer-js", "markdown": "https://wpnews.pro/news/javascriptlets-execute-a-smartobject-in-designer-js.md", "text": "https://wpnews.pro/news/javascriptlets-execute-a-smartobject-in-designer-js.txt", "jsonld": "https://wpnews.pro/news/javascriptlets-execute-a-smartobject-in-designer-js.jsonld"}}