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)
Getting Current Version in NewVers.nrs
System
We have customized our FileSave.nrs to set the document description based on various metadata fields. The code is below:
Sub IManFileSaveCmd_PostOnOK(obj)
set oImportedDoc = Context("ImportedDocument")
strDocDesc=oImportedDoc.GetAttributeByID(imProfileCustom2Description) & "_" & oImportedDoc.GetAttributeByID(imProfileCustom3) & "-" & oImportedDoc.GetAttributeByID(imProfileClass) & "-" & oImportedDoc.GetAttributeByID(imProfileSubClass) & "-" & oImportedDoc.GetAttributeByID(imProfileComment) & "_" & oImportedDoc.Number & "_v" & oImportedDoc.Version
oImportedDoc.SetAttributeByID imProfileDescription, strDocDesc
oImportedDoc.Update()
End Sub
We are trying to achieve the same result when creating a new version. However, NewVersionCmd_PostOnOK does not seem to allow the same designation of Context to "ImportedDocument". The best I can do is get the version of the current document but this doesn't do me any good as users can open an earlier version than the most recent.
Any guidance is much appreciated.
Thanks,
Ron
Find more posts tagged with
Comments
There are no comments yet