Zum Löschen von Dokumenten habe ich mal folgendes (geklautes
) JavaScript verwendet. Das setzt allerdings ein Feld mit der UID im Dokument voraus.
// the key field, Unique ID field and default view are all set by you, the developer in your own db
// A unique ID field must be set with an @text formula before it can be used
// database-specific variables, your fieldnames may vary
var Viewname="($All)";
var docKeyfield=Company.value;
var docid=Uid.value;
//generic variables based around current doc's URL
var DocCmd="?Deletedocument";
var docURL = document.URL;
var end = parseInt(docURL.lastIndexOf('?'));
docUNID = docURL.substring(0,end);
// create the URL to do the transaction
var actURL=docUNID + DocCmd;
// debug dialogs - uncomment to troubleshoot
//alert ('actURL returns: ' + actURL) ;
msg='Are You sure you want to DELETE this order for ' + docKeyfield + ' ?';
if (confirm(msg)) {
window.location=actURL;
}