Formula help
Hi to all!
i am trying to activate function through a formula to open specific record.
this is the formula:
html("<button class='customButton' onclick='openMaster()'>Open Master</button>
<script>
function openMaster() {
let xMasterID := 'Master ID';
let x = first(select Master where 'Master Release Number' = xMasterID);
openRecord(x);
}
</script>
")
the same code on a button does correctly his function (that indicates that the problem is in the html syntax I suppose) but on that formula field doesn't work.
Can you suggest some corrections?
9 replies
-
You can configure a formula field as a button too. (more options > On click)
Or change the code to :
let xMasterID := 'Master ID'; let x = first(select Master where 'Master Release Number' = xMasterID); html(---<button class="customButton" onclick="ui.popupRecord('{ x }')">Open Master</button>---)
-
Thank you a lot.
The formula worked for just one time, I edited it to assign to a string instead to a button, and when I started again with it, the SAME formula is not working ()
-
can you suggest a way to open the record simply clicking to the string "Open Master" without creating a button?
Thank you a lot
-
This line
let x = first(select Master where 'Master Release Number' = xMasterID);
should read
let x := first(select Master where 'Master Release Number' = xMasterID);
Hope that helps
Regards John
-
done with AI support:
<span onclick="ui.popupRecord('{ x }')"; style="color: #191970; cursor: pointer; text-decoration: underline;">({ x.xMasterID }) <br></span>
-
now the number 12676 is clickable and opens the Master Record related
Content aside
- Status Answered
- 1 yr agoLast active
- 9Replies
- 123Views
-
4
Following