Forum Discussion
EOMDevelepors
7 years agoQrew Captain
Thanks again for your quick reply.
I am using this code as your directions but when I click the button on the parent table. It freezes an does nothing.
Here is the button formula:
"javascript:" &
"var QBU_rid = '" & [Maximum In Record ID#] & "';" &
"$.getScript(gReqAppDBID + '?a=dbpage&pagename=myscript.js');" &
"void(0);"
here is the myscript.js content
(function(){
var dbid = "bnqepesti";
var dbidTable = table dbid
var apptoken = "I put my token here";
$.ajaxSetup({data: {apptoken: apptoken}});
var description= prompt("Enter a brief description of the work done in this session: ", "");
var promise = $.get(dbidTable, {
act: "API_EditRecord",
rid: QBU_rid,
_fid_20: description,
_fid_6: "Out"
}).then(function(xml) {
console.dirxml(xml);
document.location.href = dbidTable + "?a=dr&rid=" + QBU_rid;
});
})();
I am using this code as your directions but when I click the button on the parent table. It freezes an does nothing.
Here is the button formula:
"javascript:" &
"var QBU_rid = '" & [Maximum In Record ID#] & "';" &
"$.getScript(gReqAppDBID + '?a=dbpage&pagename=myscript.js');" &
"void(0);"
here is the myscript.js content
(function(){
var dbid = "bnqepesti";
var dbidTable = table dbid
var apptoken = "I put my token here";
$.ajaxSetup({data: {apptoken: apptoken}});
var description= prompt("Enter a brief description of the work done in this session: ", "");
var promise = $.get(dbidTable, {
act: "API_EditRecord",
rid: QBU_rid,
_fid_20: description,
_fid_6: "Out"
}).then(function(xml) {
console.dirxml(xml);
document.location.href = dbidTable + "?a=dr&rid=" + QBU_rid;
});
})();