-
Goal:
I want to execute a query that creates a record, returns an ID. I want to immediately trigger a switch to a new page with that ID in the query string. -
Steps:
I added a button to my form. The button has a script as its on-click event:
create_new_data_element.trigger({
additionalScope: {},
onSuccess: function (data) {
utils.openPage("data_element_details",{"passDataWith":"urlParams",queryParams: {"id": data.newDataElement.id }, hashParams: {}, globalVariable:{}, setInOrSetValue: "Set in", keyPath: null, globalVariableValue: null, persistUrlParams: false, newTab: false});
console.log("yay3");
},
onFailure: function (error) {
},
});
But the ID keeps coming as undefined.
when I print the ID it show sup in the console, so I'm correctly accesssing it. The issue is somehow passing query parameters is not working.