Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the version number of an selected item in tridion?

How can I get the version number of an selected item (Component/Page)

I am using the below code

VersionedItemData verinfo=csClient.Read(<selecteditemid>, new ReadOptions()) 
                                                         as VersionedItemData;
<selecteditemid> = Component/Page id
like image 347
pavan Avatar asked Dec 16 '22 21:12

pavan


2 Answers

Version and Revision properties are available in FullVersionInfo, so you have to cast VersionInfo of your item:

((FullVersionInfo) verinfo.VersionInfo).Version
like image 162
Andrey Marchuk Avatar answered May 10 '23 15:05

Andrey Marchuk


VersionItemData.VersionInfo.Version will return you the latest version number.

like image 23
Bappi Avatar answered May 10 '23 13:05

Bappi