i need to delete the infopath form as the form moved to another folder in sharepoint server. - InfoPath Dev Sign in | Join | Help in Code InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Code » i need to delete the infopath form as the form moved to another folder in sharepoint server. 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: Oldest to newest Newest to oldest Previous Next 11-05-2009 12:41 AM raghavendra.charyulu Joined on 11-04-2009 Posts 2 i need to delete the infopath form as the form moved to another folder in sharepoint server. Reply Contact 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. ThanksRaghavendra 11-11-2009 06:00 AM In reply to Qazi Anis Joined on 03-13-2009 Chicago Posts 1,025 Re: i need to delete the infopath form as the form moved to another folder in sharepoint server. Mark as Not AnswerMark as Answer... Reply Contact 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 AnisTechnical ArchitectBitwise Inc 11-16-2009 03:24 AM In reply to raghavendra.charyulu Joined on 11-04-2009 Posts 2 Re: i need to delete the infopath form as the form moved to another folder in sharepoint server. Mark as Not AnswerMark as Answer... Reply Contact 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.
i have used the code below:
{
path = rootPath +
fileName = thisXDocument.DOM.selectSingleNode(
thisXDocument.UI.Alert(
}
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.
ThanksRaghavendra
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)
i need to delete the form using the code, so can you suggest in that manner.