Update a field and jump in a record.
I have a JavaScript function used to do a update of a field and jump in a record.
---
function myClickTitleIntervention(id, url, valeurClick) { "{" }
console.log("Start");
var myElement = database.schema.typeOf(id);
var myElementField = myElement.findElement("ValeurClick");
database.loadNode(id, function (error, node) { "{" }
if (error) alert(error);
if (node){ "{" }
var myNewValue = valeurClick;
database.update( node._id, myElementField.id, myNewValue, (err) => { "{" }
if (error) alert(error);{ "}" } );{ "}" }{ "}" });
if (window.ui) ui.popupRecord(id);
else alert(url);{ "}" }
---
This function work fine for many times. And now is broken, probably with the update of ninox.
I tray to make same new fonction, but i can't find the database.schema inside the dom.
How can find the node of the DOM for making my update?
Any help are welcome.
Robert
Reply
Content aside
- 1 mth agoLast active
- 21Views
-
1
Following