Call stored procedure when form is deleted - InfoPath Dev
in

InfoPath Dev

Call stored procedure when form is deleted

Last post 10-03-2006 11:02 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-03-2006 10:58 PM

    Call stored procedure when form is deleted

    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
  • 10-03-2006 11:02 PM In reply to

    Re: Call stored procedure when form is deleted

    Hi Justin,
    I'm assuming your database is separate from the SQL database used for SPS. You could uniquely identify the DB record using a guid or some sproc in the database and then pass this unique id to another sproc or web method to handle the delete. We do this in our Database Accelerator by storing a Document ID in the PI of the form. Good luck!
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.