Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8214765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:33:58+00:00 2026-06-07T11:33:58+00:00

I am using Tridion 2011 SP1, And I am creating workflow like start–>create–>Review–>publish–Stop. I

  • 0

I am using Tridion 2011 SP1, And I am creating workflow like start–>create–>Review–>publish–Stop.

I created and registered the class library, and invoke the C# method using VBscript (Script Editor of WF Tab) as given below.

Option Explicit
Dim workflowHandler
Set workflowHandler= CreateObject("CoreComponentWorkflow.WorkflowHandler")
If Not workflowHandler Is Nothing Then
Call workflowHandler.PublishComponent(Cstr(CurrentWorkItem.ID))      
     FinishActivity "Published to WIP"
End If
Set workflowHandler= Nothing

Is the above code is correct? I am sure I am able to create object using the below line.

Set workflowHandler= CreateObject("CoreComponentWorkflow.WorkflowHandler")

And currently I am publishing the current item only using the C# code, am calling the C# function as below.

Call workflowHandler.PublishComponent(Cstr(CurrentWorkItem.ID))      

After publishing the item, I am finishing the activity using below.

FinishActivity "Published to WIP"

I have checked the above code directly in the server by hard coding the currentworkitem, it was working fine. But when I put the same code in vbscript editor, the item is not published.

Can any one suggest on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:34:00+00:00Added an answer on June 7, 2026 at 11:34 am

    When you hardcode you might be adding the TCM ID directly so it is working properly, which means that CurrentWorkItem.ID is not the correct API call to get the Component ID. See Igor comment below to get the tcm id.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating Schema using Core Service in SDL Tridion 2011 SP1. In the
I am using SDL Tridion 2011 SP1. I am creating the Dreamweaver TBB for
I am using SDL tridion 2011 SP1. I want to get the list of
I am using SDL Tridion 2011 SP1. I need small clarification regarding multimedia schema
I am building a GUI extension using SDL Tridion 2011 SP1. I want to
Trying to reupload the DD4T.Templates.dll into Tridion 2011 SP1 using the TcmUploadAssembly in the
I am working on an XSLT TBB in Tridion 2011 SP1, using the XSLT
I am trying to create a Component1 in Tridion 2011 SP1. I also have
I'm trying to create a custom deployer in Tridion 2011 SP1 that can index
I'm attempting to setup a new .NET application using Tridion 2011 SP1 and Smart

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.