Set Properties from UIX

Hi There!

I am trying to set a few properties from the user input (textbox).

No issue on the frontend. However, I tried the simplest approach which is by having the function abc() declared within the <script> tag and then it call the function with onClick() method in html. No success.

I know a few people have shared a little bit of code snippet on updating workflow and whatnot.

Anyone can share the entry point for it? Because I kept getting 'Unable to get property ShellUI of undefined or null reference' error.

can calling the function with the onClick() html work?

  • I'd need to see a little more here.  It sounds like you're trying to interact with the module code (e.g. the ShellUI) from within the dashboard; that won't work.

    The dashboard should have a "Vault" reference that you can use to then use the COM API structures to update the object.

  • So currently I got this simple set up on my dashboard:

    body>
    <div>
    Text to send: <input type="text" id="textToSend" />
    </div>
    <input type="submit" onclick="sendText()" value="Submit">
    </body>

    <script>

    function sendText(){

    var text = document.getElementId('textToSend').Value;

    //code to update the object

    }

    </script>

    Would something like this work?

    Well, another option is to go with a Vault Extension Method. But I don't know how to connect it with the input.

  • Take a look at the below to get an idea:

    <html>
    <body>
    <div>
    Text to send: <input type="text" id="textToSend" />
    </div>
    <input type="submit" id="mySubmit" value="Submit">
    
    <script type="text/javascript">
    
    function OnNewDashboard(dashboard)
    {
       // This is called when the dashboard is rendered.
       // The dashboard has a Vault reference you can use.
       
       // By wiring up the event handlers here we have easy access to the dashboard.
       
       // Wire up the event handlers.
       document.getElementById("mySubmit").onclick = function()
       {
        // Get the value.
        var value = document.getElementById("textToSend").Value;
        
        // TODO: Do something with it.
        // For example, something like:
        dashboard
            .Vault
            .ExtensionMethodOperations
            .ExecuteVaultExtensionMethod("myVaultExtensionMethod", value);
            
        // TODO: Close the window?
       }
    }
    
    
    </script>
    </body>
    </html>