Deleterecord removes a record, given its priref.
command=deleterecord&<parameter>=<value>&...
output
can be either json
or xml
(xml
is the default, so you don't need to specify that explicitly). However, the output format produced by jQuery applications is always JSON, so you don't need to specify the output type there either.output=json
, because the output format is JSON by default.
To delete a record via de Axiell WebAPI, you have to know the record number (priref) of the record you want to delete. This priref can be obtained by searching for the desired record first, in any of the different ways described elsewhere in this documentation.
Write a new record with just title notes in database 'externalobjects' show
A new record will be created. If it has number 10000049, you can delete it via the second example below. Note that creating a new record via a URL, like below (by HTML encoding and then URL encoding the XML data to be written) is a deprecated method: in your own application, use the POST method instead.
http://test2.adlibsoft.com/api/wwwopac.ashx?database=externalobjects&xmltype=grouped&command=insertrecord&data=%26lt%3BadlibXML%26gt%3B%26lt%3BrecordList%26gt%3B%26lt%3Brecord%26gt%3B%26lt%3Bpriref%26gt%3B0%26lt%3B%2Fpriref%26gt%3B%26lt%3Btitle.notes%26gt%3Btest%20writing%20title%20notes%26lt%3B%2Ftitle.notes%26gt%3B%26lt%3B%2Frecord%26gt%3B%26lt%3B%2FrecordList%26gt%3B%26lt%3B%2FadlibXML%26gt%3B
Delete the record you created in the previous example show
If the record to be deleted doesn't exist, you'll receive an Adlib.Database.DatabaseRecordNotFoundException. If the record you created has a number other than 10000049, then please copy the URL manually to the URL field of your browser and replace the number 10000049 by the actual number.
http://test2.adlibsoft.com/api/wwwopac.ashx?database=externalobjects&command=deleterecord&priref=10000049
- no Adlib.Data-specific description available yet; see the URL request tab for all information -
Write a new record with just a title in database 'externalobjects' show
// Create a connection to the wwwopac.ashx conn = new AdlibConnection(url); // Create a new adlib record record = new AdlibRecord(conn, "externalobjects"); // Set the priref field record["priref"] = "0"; // Set the title field record["title"] = "A new title" // Insert the record in the database record.Insert();
Delete the record you created in the previous example show
// Create a connection to the wwwopac.ashx conn = new AdlibConnection(url); // Create a new adlib record record = new AdlibRecord(conn, "externalobjects"); record.Search(10000001); if (record != null) { // Delete the record record.Delete(); }
- no jQuery-specific description available yet; see the URL request tab for all information -
Write a new record with just a title in database 'externalobjects' show
var url = "http://test2.adlibsoft.com/api/wwwopac.ashx"; var xmldata = '<adlibXML><recordList><record>' + '<priref>0</priref><title>test title</title>' + '</record></recordList></adlibXML>'; $().adlibdata(url, { //arguments database: "externalobjects", command: "insertrecord", data: xmldata, xmltype: "grouped" }, function (adlibJSON) { alert(adlibJSON.diagnostic.hits); });
Delete the record you created in the previous example show
var url = "http://test2.adlibsoft.com/api/wwwopac.ashx"; $().adlibdata(url, { //arguments database: "externalobjects", command: "deleterecord", priref: 10000001 }, function (adlibJSON) { alert(adlibJSON.diagnostic.hits); });