Try our conversational search powered by Generative AI!

Programmatically move XForm to another XForm folder?



Does anyone have an exampleon how to use code and move a certain XForm to another XForm folder?

Should one use XFormFolder.Move, XForm.Folder or something?


I'm running EPiServer CMS 5 R2.


Oct 29, 2010 11:02

HI Marcus!

Either way works:

Guid formId = new Guid("...form id here...");
XFormFolder destFolder = XFormFolder.Create("/TestFolder2");

// method 1
XFormFolder.Move(formId, destFolder);

// method 2
XForm form = XForm.CreateInstance(formId);
form.Folder = destFolder;


Oct 29, 2010 15:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.