Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
IManExt.Import.DeleteLocalFiles - Assistance
nycmomohead
Anyone have a code snippet/advice on how to use IManExt.Import.DeleteLocalFiles?
The local files (windows files) we are importing are not deleted until we close out of the DeskSite client.
Thanks.
IMANEXTLib.ContextItems fileContext = new ContextItemsClass();
fileContext = context;
ImportCmd impCmd = new ImportCmdClass();
string file = "c:\test\file1.pdf";
string filename = file.Substring(file.LastIndexOf("\\")+1);
string fileExt = filename.Substring(filename.LastIndexOf(".") + 1);
imCheckinOptions eKeepCheckedout = imCheckinOptions.imDontKeepCheckedOut;
fileContext.Add("IManExt.Import.KeepCheckedOut", eKeepCheckedout);
fileContext.Add("ImanDestinationObject", paramFolder);
fileContext.Add("ImanExt.Import.Filename", file);
fileContext.Add("IManExt.Import.DocDescription", filename);
fileContext.Add("ImanExt.Import.DocClass", docClassText.Text);
fileContext.Add("ImanExt.Import.DocName", "document");
fileContext.Add("ImanExt.NewProfile.ProfileNoUI", true);
fileContext.Add("IManExt.OpenCmd.NoCmdUI", true);
fileContext.Add("IManExt.Import.DeleteLocalFiles", true); // Even I tried setting for "Y"
impCmd.Initialize(fileContext);
impCmd.Update();
if (impCmd.Status == (int)CommandStatus.nrActiveCommand)
{
impCmd.Execute();
bool brefresh = (bool)fileContext.Item("IManExt.Refresh");
if (brefresh == true)
{
//Succeeded in importing a document to WorkSite
IManDocument doc = (IManDocument)fileContext.Item("ImportedDocument");
//Succeeded in filing the new folder under the folder.
fileContext.Remove("ImportedDocument");
fileContext = null;
}
}
impCmd = null;
Find more posts tagged with
Comments
nycmomohead
Has anyone used this????
LegendOrder.PNG