0
onclick = ui.openRecord
Not sure if this is the right place to ask this but I have the following question.
Can the onclick event "ui.openrecord" in a button also be executed in a function in javascript? For example:
<button onclick = ui.openrecord('{id}')>Button</<button>;
I want to execute a function in JavaScript for this to alow other additional script in the function, for example:
<button onclick = "buttonclick()">button</button>
<script>
function buttonclick() {
?????? (what goes here?)
};
</script>
6 replies
-
Yes, it can. This is a simple example.
let list := (select Table1).Text; html(" <button onclick=""customOpenRecord()"">Open Record</button> <script> function customOpenRecord() { ui.openRecord('" + raw(first((select Table1)[Text = item(list, 1)])) + "'); } </script> ")
It opens the record that matches Text in Table1. You can also add more code inside the function.
Content aside
- 9 mths agoLast active
- 6Replies
- 218Views
-
3
Following