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)
DeskSite event wrapper
reesbevan
Please help!
Trying to check the doctype value of a document whenever someone opens/emails/copies/creates new version, etc.
If doctype = x or y, then we want the edit profile dialog to display.
How on earth do I do this? I know it probably has something to do with ImanExt...
Thanks in anticipation
Allan
Find more posts tagged with
Comments
jny
I would not use the ICommand Event Wrapper. For one thing, this does not really serve any purpose for the OpenCmd.
Each command that you would like to customize, you could have a custom wrapper command for it; that is, implement the ICommand Interface to add your custom logic in the ICommand_Execute. And in your custom logic, you may want to:
(1) Check the document's target profile field value -- this is done by getting a handle to the document object via mContext("SelectedNRTDocument") and calling GetAttributeByID on the field via the imanage.dll.
(2) If the returned value matches your target, display a lookup dialog (if target is a lookup field) or text box for end-user to prompt user to enter a new value. If it's a lookup field, you may use the lookupCmd object exposed by the imanext.dll that corresponds to your field to prompt the user to reselect. Update the changes using the document object accordingly.
(3) Create an instance of the command object exposed by the imanext.dll that corresponds to the command that you would like wrap and execute it.
I don't think it's necessary to bring up the edit profile dialog if you only want to force the user to choose a different field value.
Hope this helps.