1

I am trying to get the current component TCM id (component which entered in the workflow) with the VBscript given below, but am not getting the Component TCM id (something like tcm:56-1567)

I tried to use the below code, it gives the id like tcm:56-363-131200

processingitem = CurrentWorkItem.ID

And tried like the below code, it gives the id like tcm:56-195-131076

processingitem = CurrentWorkItem.ActivityInstance.ProcessInstance.ID

And tried like the below code, it doesnt give anything.

processingitem = CurrentWorkItem.GetItem()
processingitem = CurrentWorkItem.GetItem(2)
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Jey
  • 2,137
  • 4
  • 22
  • 40

1 Answers1

2

It should be: CurrentWorkItem.GetItem(2).ID. What does it return for you?

Andrey Marchuk
  • 13,301
  • 2
  • 36
  • 52
  • CurrentWorkItem.Subject or CurrentWorkItem.Subject.ID is not giving the component TCM id – Jey Jul 10 '12 at 07:10
  • I am trying to get workitem from the WF VB Script editor. and Subject returns null – Jey Jul 10 '12 at 07:47
  • I thought you are using TOM.NET, or CoreService. Updated my answer. If this doesn't work, please tell us what does it return. – Andrey Marchuk Jul 10 '12 at 07:58