Skip to main content
deleted 81 characters in body
Source Link
Nuno Linhares
  • 29.1k
  • 3
  • 42
  • 91

Thanks Nuno for saving my day. I was able to get the minor version data using 'v0' through coreservice from which am passing it to the js file. Please find below the code snippet.

Client client = new Client(); string tcmid = "tcm:222-7316-64"; IdentifiableObjectData identifiableObjectData = client.Read(tcmid, null); if (identifiableObjectData == null) return; FullVersionInfo fullVersionInfo = identifiableObjectData.VersionInfo as FullVersionInfo; if (!fullVersionInfo.LockType.Value.HasFlag(LockType.NewItem)) { client.Impersonate("NT AUTHORITY\\SYSTEM"); identifiableObjectData = client.Read(tcmid + "-v0", null); }

Client client = new Client();
string tcmid = "tcm:222-7316-64";
IdentifiableObjectData identifiableObjectData = client.Read(tcmid, null);
if (identifiableObjectData == null) return;
FullVersionInfo fullVersionInfo = identifiableObjectData.VersionInfo as FullVersionInfo;
if (!fullVersionInfo.LockType.Value.HasFlag(LockType.NewItem))
{
    client.Impersonate("NT AUTHORITY\\SYSTEM");
    identifiableObjectData = client.Read(tcmid + "-v0", null);
}

Thanks Nuno for saving my day. I was able to get the minor version data using 'v0' through coreservice from which am passing it to the js file. Please find below the code snippet.

Client client = new Client(); string tcmid = "tcm:222-7316-64"; IdentifiableObjectData identifiableObjectData = client.Read(tcmid, null); if (identifiableObjectData == null) return; FullVersionInfo fullVersionInfo = identifiableObjectData.VersionInfo as FullVersionInfo; if (!fullVersionInfo.LockType.Value.HasFlag(LockType.NewItem)) { client.Impersonate("NT AUTHORITY\\SYSTEM"); identifiableObjectData = client.Read(tcmid + "-v0", null); }

Thanks Nuno for saving my day. I was able to get the minor version data using 'v0' through coreservice from which am passing it to the js file. Please find below the code snippet.

Client client = new Client();
string tcmid = "tcm:222-7316-64";
IdentifiableObjectData identifiableObjectData = client.Read(tcmid, null);
if (identifiableObjectData == null) return;
FullVersionInfo fullVersionInfo = identifiableObjectData.VersionInfo as FullVersionInfo;
if (!fullVersionInfo.LockType.Value.HasFlag(LockType.NewItem))
{
    client.Impersonate("NT AUTHORITY\\SYSTEM");
    identifiableObjectData = client.Read(tcmid + "-v0", null);
}
Source Link

Thanks Nuno for saving my day. I was able to get the minor version data using 'v0' through coreservice from which am passing it to the js file. Please find below the code snippet.

Client client = new Client(); string tcmid = "tcm:222-7316-64"; IdentifiableObjectData identifiableObjectData = client.Read(tcmid, null); if (identifiableObjectData == null) return; FullVersionInfo fullVersionInfo = identifiableObjectData.VersionInfo as FullVersionInfo; if (!fullVersionInfo.LockType.Value.HasFlag(LockType.NewItem)) { client.Impersonate("NT AUTHORITY\\SYSTEM"); identifiableObjectData = client.Read(tcmid + "-v0", null); }