Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I create a multimedia component by core service and print it's tcm id I found printed tcm Id like tcm:163-34568-v0 but when I go sdl gui I found that there tcm showing like tcm:163-34568

what is the mean of -v0 in tcm Id how I remove the -v0 from the tcm Id .

share|improve this question

3 Answers 3

up vote 1 down vote accepted

it simply represents the version of the item. like "-V24" is 24th version.

share|improve this answer

The v0 is called dynamic version. It means that this is the version of checked out item. For example you have a component with Id tcm:x-xx - this means this is the latest checked in version of your component. It's the same as tcm:x-xx-v(last major version number). If you will check it out, tcm:x-xx will still point to the latest checked in version and there will be a new version created - tcm:x-xx-v0 - this is the dynamic version. It contains all the changes made while item is checked out. When item get's checked in, tcm:x-xx-v0 becomes the next version of item and -v0 is removed. So in your case, -v0 means that item is checked out and you have a dynamic version in your hands.

Keep in mind that not everyone can read dynamic version, safe bet is user who checked item out or user who is assignee in current workflow activity.

share|improve this answer

"v0" is the version, with the zero indicating that it's the current version of the Component.

As far as I know, there's no built-in way to retrieve the ID without the version; however, it's simple enough to produce:

var version = string.Format("tcm:{0}-{1}", tcmId.PublicationId, tcmId.ItemId);

Or with an extension method:

public static string WithoutVersion(this TcmUri tcmId)
{
    if (tcmId.ItemType == ItemType.Component)
    {
        return string.Format("tcm:{0}-{1}", tcmId.PublicationId, tcmId.ItemId);
    }

    return string.Format("tcm:{0}-{1}-{0}",
        tcmId.PublicationId, tcmId.ItemId, (int)tcmId.ItemType);
}
share|improve this answer
    
Nice method, but you can simply use TcmUri.GetVersionlessUri() –  Bart Koopman May 2 at 12:40
    
@BartKoopman That'll be why I couldn't see a property for it in the docs, then. –  Ant P May 2 at 13:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.