Delete documents using SharePoint and "Propagate Delete" - InfoPath Dev
in

InfoPath Dev

Delete documents using SharePoint and "Propagate Delete"

Last post 07-21-2011 05:56 AM by ErnestoM. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-08-2011 08:20 AM

    Delete documents using SharePoint and "Propagate Delete"

    I am using Infopath 2007 and DBXL 2.3.

    I have a document type in DBXL. The users access the documents via SharePoint DataViews,  I have created some screens using SharePoint designer, and they utilize DataViews into the SQL database.  The DataViews have hyperlinks to the documents - i.e the dbxl link  This is working well.

     The key user would like to be able to delete documents without having to contact me. 

    In order to give this functionality - without access to DBXL, I have created a form library in SharePoint, where I map the DBXL documents and I have ticked Propogate delete.  Only the key user has a menu option to get to this library, although other users appear to need contribute rights for the mapping to work.

    This seems to work well most of the time .  But I have started to get some errors - see below.  The Form library for deleting is called DeleteNPAPRequests and I seem to get these errors when I am editing the document using the hyperlink from the DataViews not when I am trying to delete the document from the DeleteNPAPRequests library.

    Is what I am trying to do a suitable solution ?  I really do not want to give access to the DBXL Catalog - I think it would cause confusion. 

    Are these errors caused because I am keeping the document open too long ?  I have noticed I have autosave on, would that be affecting it?

    Thank you

    Catharine

     Message: Caught exception checking out SPListItem. http://....../DeleteNPAPRequests (DocType = 'Request', DocId = 2781)

    Microsoft.SharePoint.SPException: The file "DeleteNPAPRequests/2781.xml" is checked out or locked for editing by ...... ---> System.Runtime.InteropServices.COMException (0x8107090E): The file "DeleteNPAPRequests/2781.xml" is checked out or locked for editing by .....
       at Microsoft.SharePoint.Library.SPRequestInternalClass.CheckOutFile(String bstrUrl, String bstrWebRelativeUrl, Boolean bCheckoutToLocal, String bstrLastModified)
       at Microsoft.SharePoint.Library.SPRequest.CheckOutFile(String bstrUrl, String bstrWebRelativeUrl, Boolean bCheckoutToLocal, String bstrLastModified)
       --- End of inner exception stack trace ---
       at Microsoft.SharePoint.Library.SPRequest.CheckOutFile(String bstrUrl, String bstrWebRelativeUrl, Boolean bCheckoutToLocal, String bstrLastModified)
       at Microsoft.SharePoint.SPFile.CheckOut(Boolean bCheckoutToLocal, String lastModifiedDate)
       at Microsoft.SharePoint.SPFile.CheckOut()
       at Qdabra.Dbxl.Domain.SharePointObjectModel.Save(SharePointListItemMapping mapping, SharePointDocumentData doc)

    The stack trace was:    at Microsoft.SharePoint.Library.SPRequest.CheckOutFile(String bstrUrl, String bstrWebRelativeUrl, Boolean bCheckoutToLocal, String bstrLastModified)
       at Microsoft.SharePoint.SPFile.CheckOut(Boolean bCheckoutToLocal, String lastModifiedDate)
       at Microsoft.SharePoint.SPFile.CheckOut()
       at Qdabra.Dbxl.Domain.SharePointObjectModel.Save(SharePointListItemMapping mapping, SharePointDocumentData doc).

  • 07-08-2011 09:27 AM In reply to

    Re: Delete documents using SharePoint and "Propagate Delete"

    If the sole purpose of SharePoint mapping is allow delete from DBXL, it would be simpler to have an Admin view in the form that has a delete button.  DBXL permissions can prevent users from deleting, or you can use an alternative mechanism to hide the delete button.  The Delete button would just need a data connection to the RemoveDocument method.

  • 07-12-2011 01:59 AM In reply to

    Re: Delete documents using SharePoint and "Propagate Delete"

    Hi Jim,

    Thank you for the advice, I have never used the RemoveDocument method... I hadn't even realised it was there. I already have an admin view, and this would be simple.

    I just have a question about locking...

    Is it ok for the user to Open up say DocID 10 and then while DocID 10 is open click the button to delete DocID10 ?  As the form is open wouldn't it be locked.?

    Just trying to understand the process.

    Catharine

  • 07-21-2011 05:56 AM In reply to

    Re: Delete documents using SharePoint and "Propagate Delete"

     If the user opens DocID 10, the lock will hopefully prevent its deletion.

    You would need a sort of catalog form, one that lists all documents available, and allows you to delete one without having to open it.

    If you want help setting up a catalog form, let us know.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.