Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Folder Profile
1tchy
Hi,
Does anyone know how to get an nrs script to work on the Folder profile action of the New Profile dialog?
I am trying to handle events on the New profile dialog when profiling a folder in filesite. The New Profile dialog has been customised using the dialog editor and when profiling a document (rather than a folder) my NRS script works without issue.
const nrCustom1 = 25
const nrCustom2 = 26
const nrCustom5 = 29
Sub NewProfileDlg_OnInitDialog(dlg)
dlg.SetAttributeValueByID nrCustom1, dlg.GetAttributeByID(nrCustom1),False
dlg.SetAttributeValueByID nrCustom2, dlg.GetAttributeByID(nrCustom2),False
dlg.SetAttributeValueByID nrCustom5, dlg.GetAttributeByID(nrCustom5),False
End Sub
Find more posts tagged with
Comments
jny
This script only runs when the newprofile dialog is used for importing becasue it is the ImportCmd that fires this script.
When it's used as Folder Profile dailog, which does not involve the execution of the ImportCmd, the script does not get fired.
What are you ultimately trying to accomplish? Perhaps there is another approach.
1tchy
That makes sense, thanks Jny.
I'm trying to make a number of custom fields that we have added to the dialog read-only when the folder is properties are edited. We don't want to give users the ability to change folder metadata as it should be inheriting this from the workspace.
jny
I see. There is, unfortunately, no good way to proactively disable the folder profile so to prevent user's edits.
You may, however, preserve the inherited metadata by implementing an ICommand Wrapper command to wrap around the native command to restore the originally populated metadata post edit, and warn the user that their edits (and subsequent re-filing) fell through...
I have this stocked VB example project which demonstrates the implemenation details. You can test it simply by rebuilding the DLL or register the current one, and merge the registry key setting in the included .reg file.
This project example is written for FileSite 8.x.