12 votes

How can I tell if event system code has been loaded?

The event system code loads when the Tridion Content Manager Service Host service loads, and you can see this in the Windows Event Viewer. As each event handler loads you will see the status showing ...
  • 1,090
11 votes

Is it possible to "undo check out" in an event handler for "check in" in the initiated phase?

Unless you're trying to implement really granular permissions (more on that in a minute) it makes more sense to handle this on the check-out event instead. The rudimentary issue that I see - and this ...
11 votes
Accepted

Easiest way to update all components after schema update

What have you tried? If you're just starting your search then the docs references below are a great start. Both the TOM.NET and Core Service APIs are available but it shouldn't be about what's ...
9 votes
Accepted

Overriding Publishing Queue

For #1 publishing priority is the way to go. Maybe changing the default priority to "low" will give you enough of an override to push things through quickly. Using publishing priorities in conjunction ...
  • 7,317
9 votes
Accepted

Unable to capture Save event of returning components from Translation Manager

You can try the below events related to Workflow: 1.Event for Workflow process starts EventSystem.Subscribe<ProcessInstance, StartWorkflowEventArgs>(OnProcessInstanceStart, EventPhases....
9 votes

GUI not rendering <br> and new line showing error messages

You would have to make CSS updates through a GUI extension besides using the new line (\n) in your exception message. In your event system exception, you will be using the new line like this: throw ...
8 votes

Is there a field change event I can subscribe to?

You could consider [[removed:OOTB]] Supported category use with the Tree View. The user would select from the top-down and the field populated with the final select. Of course, by supported I mean ...
8 votes

Tridion Event System with specific User

Another option is to temporarily elevate permissions of the current user in the event handler: using (ElevatedPrivilegesScope scope = new ElevatedPrivilegesScope(nonAdminSession, Privileges.SysAdmin))...
  • 561
7 votes

How do I update my Component (metadata) fields while copy/pasting a Component, using EventSystem?

Bart already pointed out the proper order to do this check-out/modify/check-in cycle after the copy operation is performed. Do note that this approach leads to a version 2 on the copy: version 1 is ...
7 votes
Accepted

How do I update my Component (metadata) fields while copy/pasting a Component, using EventSystem?

So you set the title after making sure your Component is checked out, but you tried to sync back the changes of the content before ensuring it is checked out: ... // sync content back to Component ...
  • 29.6k
7 votes

Event system - capture copy - paste event for keyword

You should be able to do this by subscribing to initiated phase of the copy event of a Keyword and removing the related Keywords. For example: EventSystem.Subscribe<Keyword, CopyEventArgs> (...
  • 19.8k
7 votes

Event System with multiple DLLs

For 2011 and up I would actually say it is preferred to use multiple DLLs, specifically so you can isolate different features and have a better control over what events you want enabled or not. You ...
  • 29.6k
7 votes
Accepted

Ways and steps to debug custom event handler code if any

Have you googled, you must have found following http://yatb.mitza.net/2012/03/debugging-tridion-2011-event-system.html
  • 5,857
7 votes

Overriding Publishing Queue

What you are requiring is mainly to use publish queue in a way its not meant to be used. For #1 you want to publish items before all others. That is the exact purpose of "high" priority. Problem is ...
  • 8,506
7 votes
Accepted

Creating an Item with the Tridion Event System

Use the StructureGroup constructor to get a new SG, something like this: StructureGroup newSg = new StructureGroup(session, parentSGTcmId); Here is a snippet from the API docs:
7 votes

Tridion Event System with specific User

I would not try to impersonate an admin user from the event system. It opens up all kinds of vulnerabilities that you probably don't want. Instead, I would create a separate service (e.g. a REST ...
  • 6,610
7 votes

What is the difference between EventSystem.SubscribeAsync and EventSystem.Subscribe events in Tridion Event system?

The difference is that on an ASYNC (SubscribeAsync) event, your code will run without blocking the main event from happening, while on SYNC events (Subscribe) the main event will wait for your code to ...
  • 28.9k
7 votes

How to access Tridion Config Component in Event System

As Atila, mentioned using core service in event system is never recommended but instead TOM.NET and to get the component "configComponent" in event system you can take the reference of the below code. ...
  • 2,208
6 votes

Event System with multiple DLLs

When it comes to specifics around Tridion, the thing to consider with multiple event DLLs is that it may not be clearly visible what all the subscribed events are. For example, several DLLs may ...
6 votes
Accepted

Event System with multiple DLLs

I'm not aware of any performance issues or other things to consider. So I'd say go for it, as long as it logically makes sense to split them up and you don't create hundreds of them :)
  • 19.8k
6 votes
Accepted

Catching Published or UnPublished in the SetPublishStateEventArgs

I might be missing something in your question, but isn't it as simple as looking at args.IsPublished? The SetPublishState event is only called after a successful transaction, so the Page will either ...
  • 29.6k
6 votes
Accepted

Ignore event system trigger when removing older versions

Well, before the execution of any code in event handler. You should check the version of the component. You can get the version of a component by component.Version. I haven't run the code for this ...
6 votes
Accepted

Tridion Publishing error Logs

Here are the logs which are helpful during publish and their configuration: Event Viewer: Tridion Tridion Content Manager Logfiles on CM/Publisher Servers: %TridionHome%\log\TcmPublisher.log %...
6 votes

How can we make an event to trigger when something published from specific Publication?

The event handlers (triggers) are system-wise, so you will have to control the publication scope from within the event itself. I would check it at the very beginning, see the example below: [...
6 votes
Accepted

Appending TCM of newly created component to component title

In the transaction committed phase you would have to call the Save method on the component, which would create a new major version. Unfortunately, this is the only way to do it as far as I know.
6 votes
Accepted

Order in which resolved- and processed items are populated in PublishTransaction save event

Regarding the "Why are there two 'Rendering' states?", or more accurately "Why are there two Save events with State 'Rendering'?": you already more or less answered the question yourself -- the first ...
6 votes

How to ForceFinish the Workflow Process by setting Approval Status as "Undefined"?

The Import/Export Service (as used by Content Porter) will set Session.ContextData so Event Handlers can detect that the Events are triggered by a Content Manager Import action. You could catch that ...
6 votes

Updating approval status of a item | On Save | Event System

Approval status is currently a read only property in the API and the only way it can be changed is via a workflow process (other than what you've currently done with your event system, which is ...
6 votes
Accepted

Custom Event Handler when Saving Component not Firing

From looking at the code there are a few remarks which I will make, but looking at your description I'm not directly seeing reasons why it shouldn't work. If you only have a single CM server (not an ...
  • 29.6k
6 votes

Can Workflow be used to restrict the publishing/editing of a Page and its Components on selected Publications?

If your difference is based on the user's role in certain Publications, I would first consider adjusting authorization in terms of rights, groups, and maybe permissions. Otherwise yes, you could have ...
  • 12.6k

Only top scored, non community-wiki answers of a minimum length are eligible