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)
wrapper
guf
Hi,
I want to implement a feature on the creation of folder.
The folder name would be duplicate in a the custom 16 field.
It works great for the new folder. I create a wrapper on the IMANEXT2Lib.NewIManDocumentFolderCmd.
My problem is if the user try to edit the properties of the folder, the new name should be duplicate also to the custom 16 field.
I tried to create a wrapper for the IMANEXTLib.FolderACLCmd and on the pre_on_ok modify my context or my selected folder. It seems that the profiled is rewritten by the window.
I tried everything but my value is always reseted to its original.
could be great if someoen have idea to help on this.
thanks.
guillaume
Find more posts tagged with
Comments
guf
Hi,
I may need to clarify this.
My goal is to add to a document a metadata containing the name of the folder they are in.
For that I need to create a folder with a new metadata in the custom16. I would like this metadata to be the same as the name of the folder.
I have two case to consider folder creation and folder modification. I decided to write two ICommand event Wrapper one for each case.
1) for the folder creation I create a wrapper for IMANEXT2Lib.NewIManDocumentFolderCmd. This works great.
2) for the folder modification I use IMANEXTLib.FolderACLCmd. I believe this was the one I have to used as I didn't find any documentation on this part.
I try to modify the pre_on_ok event and add the following code:
Dim pFolder As IManage.NRTFolder
Set pFolder = mContext.Item("SelectedNRTFolder")
If StrComp(pFolder.Name, mContext.Item("PreviousName")) <> 0 Then
pFolder.AdditionalProperties.Remove "iMan___39"
Dim str
str = CStr(pFolder.Name)
pFolder.AdditionalProperties.Add "iMan___39", str
pFolder.Update
pFolder.AdditionalProperties.Refresh
pFolder.Refresh
End If
The folder is updated but as soon as the process enter in the post_on_ok function the custom16 ("iMan___39") is reseted to what it was previously. So it is like I have done nothing.
I may have misunderstand how the context works for an ICommand. I thought i may be able to modify it before or after the process.
I am really in a dead end here. My other solution would be to to fully rewrite the property window by my own, if I could avoid this it would be great.
Any help would be gladly welcome.
thanks
guf