Hi All,
We have a requirement from the client, which is to create a record in the database when a new form is published to the SPS and delete the record relating to the form when the form is deleted from the SPS.
We have already achieved creating a record in the database while adding a new form, by calling a stored procedure in the script.js:
XDocument.QueryAdapter.Command = CallSP;
XDocument.Query();
However, in the case of deletion, the only way I can think of to keep the persistency is to do something in the context menu on the Document Library Page (with the "delete" option). I found the "DeleteDocLibItem" function in OWS.js file on the server which is the "event handler" for the deletion in the context menu. But the problem is how do I call a stored procedure in this js file?
Or is there another way of doing this?
Thanks in advance.
Cheers,
Justin