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 8303319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:29:57+00:00 2026-06-08T17:29:57+00:00

From a C# TBB used by a Modular Page Template in SDL Tridion 2011,

  • 0

From a C# TBB used by a Modular Page Template in SDL Tridion 2011, is it possible to access the User object who initiated the Publishing action?

Looking at the TOM.NET 6 Programmers Reference Guide, it seems that the property I need is the Creator property of the PublicationTransaction object, but I can’t find a way to access that from a C# TBB, I don’t see an obvious way to get the current PublicationTransaction from the engine or package objects, and I can only find a way to get a list of PublicationTransaction objects using the PublishEngine object.

Any advice would be greatly appreciated.

  • 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-08T17:29:59+00:00Added an answer on June 8, 2026 at 5:29 pm

    Have a look at these two blog posts from Mihai Cadariu:

    • How to look up the current Publish Transaction (based on a trick from Chris Summers)
    • Create a new Publish Transaction based on an existing one

    With those two you should be able to find what you need.

    The basic function you need in your TBB is this:

    public PublishTransaction GetPublishTransaction(Engine engine)
    {
        String binaryPath = engine.PublishingContext.PublishInstruction.
                                             RenderInstruction.BinaryStoragePath;
        Regex tcmRegex = new Regex(@"tcm_\d+-\d+-66560");
        Match match = tcmRegex.Match(binaryPath);
    
        if (match.Success)
        {
            String transactionId = match.Value.Replace('_', ':');
            TcmUri transactionUri = new TcmUri(transactionId);
            return new PublishTransaction(transactionUri, engine.GetSession());
        }
    
        return null;
    }
    

    It might also be worth noting that the property engine.PublishingContext.PublishInstruction.RenderInstruction.BinaryStoragePath will return something different when rendering the coder in PreviewMode or from the Template Builder compared to when the code is running in the Publisher. To see the PublishTransaction URI in the BinaryStoragePath, you must attach your Visual Studio TBB Debug Project to the TcmPublisher.exe process in order for there to actually be a PublishTransaction object present, otherwise the BinaryStoragePath will just contain a generic path like ../preview.

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

Sidebar

Related Questions

I am using XSLT mediator from SDL Tridion World to create an XSLT TBB.
I am working on SDL Tridion 2011 SP1 with the XSLT Mediator from SDL
I am working on Dreamweaver TBB in SDL Tridion 2011 SP1. In the TBB
I got answer from the SDL Tridion forum that we can enable inline editing
from fabric.api import sudo, put, run def install(): run('source /home/user/.virtualenvs/demo/bin/activate') run('pip install requests') if
I have a method as follows (from a class than implements TBB task interface
from fabric.api import env, sudo def get_hostname(): env.hosts = ['user@host_ip'] env.passwords = {'user@host_ip': 'password'}
Is there a way that I can (using tbb from intel) specify the number
In a TBB I am trying to find a Page using the Criterias and
From JSP file accessed another JSP file which acts like java class, this used

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.