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)
Worksite NewImportCmd - Cannot get it working
annaL
Hi
If Im understanding the very sketchy brief SDK documentation, you can pass the following to the import command so that the enchanced file save dialog box is displayed:
IManExt.NewProfile.ProfileNoUI = false
IManExt.OpenCmd.NoCmdUI = false
However - no matter what I do I cannot get this to work.
I set the context items up with the values that are known and am expecting the dialog box to be displayed for any other info that needs filling in - i.e. its not a silent import.
Has anyone got this to work? Anyone got any examples? Grateful for any help.
Many thanks
anna
Find more posts tagged with
Comments
annaL
Have finally got it working - here is a clip of the code incase it helps anyone having difficulty:
var ctx = new IMANEXTLib.ContextItems
{
{"NRTDMS", (NRTDMS) objLocalDMS},
{"ParentWindow", 0},
{"DestinationObject", Session},
{"IManExt.CalledFromIntegration", true},
{"IManExt.SaveAsOptionCmd.SaveAsTypesArray", saveAsTypeList},
{"IManExt.SaveAsOptionCmd.SaveAsTypesIndex", 0},
{"ApplicationTypesArray", applicationTypeArray},
{"IManExt.Import.DocDescription", String.Empty},
{"IManExt.Import.DocAuthor", strUser},
{"IManExt.Import.DocClass", String.Empty},
{"IManExt.Import.Filename", sFile},
{"IManExt.InheritSecurity", true},
{"IManExt.DocumentType", sDocType}, {"IManExt.Import.DocType", sDocType},
{"IManExt.NewProfile.ProfileNoUI", false},
{"IManExt.OpenCmd.NoCmdUI", false}
};
var savecmd = new NewImportCmd();
savecmd.Initialize(ctx);
savecmd.Update();
savecmd.Execute();
if (savecmd.Context.Item("IManExt.Refresh") != null)
{
IManDocument importedDoc = (IManDocument)savecmd.Context.Item("ImportedDocument");
}