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)
Document Type
Fearstar
Is possible to setup in Interwoven Worksite to stop the creation of certain document types? For example, there are documents with a .swd extension in Worksite that I wish for people to keep using and saving but I do not wish them to create new documents.
Find more posts tagged with
Comments
jny
Are you trying to keep users from importing a specific document type from within a WorkSite Desktop Client, i.e., FileSite, DeskSite, Office Integration, etc.? Or something else?
Fearstar
Yep - that is my aim.
jny
There isn't a completely effective way to do this in WorkSite 8.
You may keep the importing from going through via NRS Scripting to catch the PreOnOK event, which is fired when the end-user selects the OK button in the New Profile dialog, like so:
Sub NewProfileCmd_PreOnOK(obj)
Dim sType
sType = obj.GetAttributeByID(7)
msgbox "Cannot check in file type: " & sType
'Code to stop dialog from closing and to cancel OnOK process
obj.CloseOnOk=True
Context.Add "iManExt.DoOK", False
End Sub
This will close the dialog without importing the document in DeskSite/FileSite when you do a context menu Import. But, if you are in 8.0, and uses Enhanced Application Integration mode, then it will not work so well using newprof.nrs. In the case of a drag-n-drop import, the above script would not process successfully as the file save dialog source would still import the file.
Another approach would be to use the same script but keep the dialog open until they select cancel. So, basically, using script to force the end-user to cancel out of the dialog when the document type is not allowed for importing. But, again, the file save dailog logic will allow this to work (if you have EAI).
Either approach is viable if you're in Classic mode, but neither approach is sophisticated.
This would be an enhancement request. Please submit requests at
http://worksitesupport.interwoven.com/
, and click on New Feature Request link.
Fearstar
jny - thanks for the help so far. Unfortunately we are running in Enhanced Application Integration mode. So there is very little we can do about this?
taibooz
Hi,
You can use lookupcmd button to hijack document type with SDK.
T.
jny
Lookup command button hijack would not help; Fearstar is attempting to prevent this from happening at import.
Document type field and its lookup button are disabled when the dialog is loaded for one thing. For another, user would actually need to press the lookup button in order for the code to hijack the lookup command.
You would need to request an enhancment for the SDK to support a mechanism that can detect the file type as well as a way to stop the importing.
Today, you can hijack the ImportCmd so that you may execute your ICommand Wrapper command to (1) check the import file type -- which would require using methods outside of the SDK -- and (2) exit or invoke an instance of the ImportCmd. There is, however, no good way to hijack importing when it's done via drag-n-drop completely. Although there is a way to hijacke drag-n-drop, it also does not work for e-mails with attachments. When this happens, the SaveEmailCmd is executed by the client-side source insteand of the importcmd, and the SaveEmailCmd cannot be hijacked.