banneralterian

Immedacy: Deployment Server Notes

Missing Deployment Server Option in Manager

Log into the admin panel, then go to configuration for the site in question and open the Editor Configuration screen. Down at the bottom of the screen, you can tick the “Show Upload” box and then click on save changes.

DMS Upload API Call

Guid docID = DocumentInfo.AddNew(user, folderid,filename,length,data,false); //add the new document, returning the document ID
DocumentInfo document = new DocumentInfo (docID, user);  //To load the new document into an object so that you can update the metadata.

DMS Metdata Plug-in Browser

<html>
<head>
<title>Document Selector&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<SCRIPT LANGUAGE="javascript">
da = window.dialogArguments;            // Scripting.Dictionary object - allows passing of parameters
support = da.Item("Support");            // Support object - used to access Immediacy functionality
siteurl = support.GetImageFolder()+"../";
document.write("<script language=\"javascript\" src=\""+siteurl+"plugins/plugin.js\"><\/script>");
function init()
{
// Set a default return value - just in case the user click on the X
window.returnValue = false;
//Set dialog size
window.dialogHeight = "266px";
window.dialogWidth  = "430px";
innerHTML = da.Item("innerhtml");
if(innerHTML == null || innerHTML=="undefined")
{
innerHTML = "";
}
// Set up standard global variables for the plugin
setDefaultParam();
// Get DMSURL from Option Table
var MetaDataAsXML = support.OpenRecordsetAsXML("Select StringValue from [Option] where UniqueID='DMS' and Name='SiteURL'");
var scXML = new ActiveXObject("MSXML2.FreeThreadedDomDocument.3.0");
scXML.async = false;
scXML.loadXML(MetaDataAsXML);
var scNodes = scXML.selectNodes("Recordset/Row");
var DMSURL = "";
DMSURL = scNodes.item(0).selectSingleNode("StringValue").text;
DocumentType.value = da.Item("filetype");
ParentFolderId.value = da.Item("rootfolderid");
if(da.Item("rootfolderid") != "")
{
ParentFolderTitle.value = "Document Managed Folder";
ParentFolderTitle.disabled = true;
}
else
{
ParentFolderTitle.disabled = false;
}
setradiovalue(sortorder,da.Item("sortorder"));
}
// This function is fired when the Ok button is clicked
function doOK()
{
var v = validate();
if(v==false)
return false;
// Clear the params variable just in case
resetParam();
// Format
da.Item("sortorder")=getradiovalue(sortorder);
da.Item("filetype") = DocumentType.value;
da.Item("rootfolderid") = ParentFolderId.value;
// Set the itemTemplate
var first = false;
if(innerHTML == "" || innerHTML=="undefined")
{
first = true;
}        
var displayOld = getDisplayHTML();
var displayNew = generateDisplayHTML("Documents Selector", "Folder: ", ParentFolderTitle.value, "Show Types: ", DocumentType.value==""?"All":DocumentType.value, "Order By: ", getradiovalue(sortorder));
if(first == true)
{
innerHTML +=displayNew;        //first time, add the display HTML
}else
{
innerHTML = innerHTML.replace(displayOld,displayNew);    //later, replace the old display HTML
}
da.Item("innerhtml") = innerHTML;
// Assign the values to the dictionary object
//alert("params="+params);
da.Item("InnerHTML") = innerHTML;
// The return value must be set to true otherwise all edits will be lost
window.returnValue=true;
window.close();
}
// This function allows a user to browse for a page in the site with a tree view starting from a supplied page or defaulting to the home page.
function doBrowseParentFolder()
{
var selectedfolder = support.BrowseDMS(null,null,ParentFolderId.value,true);
if(selectedfolder != null)
{
ParentFolderId.value = selectedfolder.FolderId;
ParentFolderTitle.value = selectedfolder.FolderTitle;
}
}
function setDefaultParam()
{
var tmp;
tmp = da.Item("filetype");
if(tmp ==null)    da.Item("filetype")="";
tmp = da.Item("rootfolderid");
if(tmp ==null)    da.Item("rootfolderid")="";
tmp = da.Item("sortorder");
if(tmp ==null)    da.Item("sortorder")="FileName";
}
function resetParam()
{
da.Item("filetype")="";
da.Item("rootfolderid")="";
da.Item("sortorder")="";
}
function validate()
{
if(ParentFolderId == null || ParentFolderId == "")
{
alert("The folder id can not be empty.");
ParentFolderId.focus();
return false;
}
if(ParentFolderId.value != "")
{
var v;
v = parseInt(ParentFolderId.value);
if(isNaN(v)){
alert("The folder id must be a number.");
ParentFolderId.focus();
return false;
}
}
return true;
}
function getDisplayHTML()
{
var html="";
var start = innerHTML.indexOf("<%-->");
var end = innerHTML.lastIndexOf("<--%>");
end += 5;
html = innerHTML.substring(start,end);
return html;
}
function generateDisplayHTML()
{
var count = arguments.length;
var html=""; var i;
html = html+ "<%--><table cellPadding=0 bgColor=#dddddd border=0><tbody>";
html = html + "<tr><td style=\"FONT-SIZE: 7pt\" vAlign=top colspan=2>"+arguments[0]+"</td></tr>";
for(i=1;i<count-1;i+=2){
html = html + "<tr><td style=\"FONT-SIZE: 7pt\" vAlign=top nowrap>"+arguments[i]+"</td><td style=\"FONT-SIZE: 7pt\" nowrap>"+ arguments[i+1] +"</td></tr>";    
}
html+="</tbody></table><--%>";
return html;
}
</SCRIPT>
</head>
<body scroll="no" onkeypress="document_onkeypress();">
<!-- This table sets a margin around the entire form and causes the OK/Cancel buttons to automatically appear at a fix distance from the edge-->
<table cellpadding="0" cellspacing="5" border="0" height="100%" width="100%">
<tr>
<td valign="top">
<fieldset>
<legend>
<b>Folder&nbsp;selection</b></legend>
<table cellpadding="2" cellspacing="2" border="0" width="380" style="HEIGHT: 64px">
<tr>
<td align="right" width="122" valign="top" style="WIDTH: 122px">
<div id="brPrnt1">Select parent folder
</div>
</td>
<td valign="top">
<div id="brPrnt2">
<input class="formfield" size="6" type="text" style="WIDTH:37px" NAME="ParentFolderId">&nbsp;<input class="formfield" size="35" type="text" style="WIDTH:182px" NAME="ParentFolderTitle"
readonly ID="ParentFolderTitle">&nbsp;<input type="button" class="button" value="..." style="WIDTH:16px;HEIGHT:19px"
ID="Button1" NAME="Button1">
</div>
</td>
</tr>
<tr>
<td align="right" valign="top" width="122" style="WIDTH: 122px">&nbsp;&nbsp;&nbsp;File types to show</td>
<td valign="top">
<label for="selectmethod2"><INPUT class="formfield" id="DocumentType" style="WIDTH: 182px" type="text"
size="35" name="DocumentType"> &nbsp;</label>
<div>(Leave blank to default to show all file types)</div>
</td>
</tr>
</table>
</fieldset>
<br>
<fieldset>
<legend>
<b>Format</b></legend>
<table cellpadding="2" cellspacing="2" border="0">
<tr>
<td align="right" width="100" valign="top">
Sort Order
</td>
<td valign="top"><input type="radio" name="sortorder" value="FileName" id="rFileName" checked><label for="rFileName"> Alphabetical
title</label><br>
<input type="radio" name="sortorder" value="CreatedDate" id="rModifiedDate"><label for="rModifiedDate"> Created date</label><br>
<INPUT type="radio" name="sortorder" value="FileExt" id="rFileExt"><label for="rFileExt"> File type</label>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td valign="bottom">
<table cellpadding="0" border="0" cellspacing="0" width="100%">
<tr>
<td align="right">
<input type="button" class="button" value="Ok" id="ok" name="ok">&nbsp;&nbsp;<input class="button" type="button" value="Cancel" id="cancel" name="cancel">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

More Posts

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *