i need to delete the infopath form as the form moved to another folder in sharepoint server. - InfoPath Dev
in

InfoPath Dev

i need to delete the infopath form as the form moved to another folder in sharepoint server.

Last post 11-16-2009 03:24 AM by raghavendra.charyulu. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-05-2009 12:41 AM

    i need to delete the infopath form as the form moved to another folder in sharepoint server.

    i have used the code below:

    [InfoPathEventHandler(MatchPath = "CTRL1_15", EventType = InfoPathEventType.OnClick)]public void CTRL1_15_OnClick(DocActionEvent e)

    {

    path = rootPath + "ActionRequests/";

    deleteConnection = "TestDelete_Action";

    fileName = thisXDocument.DOM.selectSingleNode("/my:myFields/my:Profile/my:file_name").text;

    deleteFile(path + fileName + ".xml");

    thisXDocument.UI.Alert("The form was submitted successfully. Please close window by clicking close in the top right hand corner");

    }

    private void deleteFile(string fileName)

    {

    thisXDocument.GetDOM(
    "UpdateListItemsConfig").selectSingleNode("/UpdateListItemsConfig/SharepointDelete/Batch/Method/Field[@Name = 'FileRef']").text = fileName;WebServiceAdapter2 deleteFileFromSharepoint = (WebServiceAdapter2)thisXDocument.DataAdapters[deleteConnection];

    deleteFileFromSharepoint.Submit();

    }

    when i click "CTRL1_15" button the forms moves from "ActionRequests" folder to "History" folder but not getting deleted in the "ActionRequests" folder. So anyone can look into this issue and help me in solving the problem.

    Thanks
    Raghavendra

  • 11-11-2009 06:00 AM In reply to

    Re: i need to delete the infopath form as the form moved to another folder in sharepoint server.

    are you using infopath client or infopath form services to open your form,

    goto doc library -> settings -> Versioning Settings  -> Require documents to be checked out before they can be edited? (is this yes or no)

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 11-16-2009 03:24 AM In reply to

    Re: i need to delete the infopath form as the form moved to another folder in sharepoint server.

    i need to delete the form using the code, so can you suggest in that manner.

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