Can we capture the PublishTransaction TCM URI in custom Resolver while publishing?
-
Yes you can. TOM.NET API provides this capability.– Nickoli RoussakovCommented Sep 14, 2015 at 11:08
-
would you please elaborate more info...– USER1287Commented Sep 14, 2015 at 11:17
-
Have a look at the Tom.net API docs. Otherwise share what you've read/tried to solve this and specifically where you got stuck.– Nickoli RoussakovCommented Sep 14, 2015 at 15:07
-
Tridion.ContentManager.Publishing.PublishTransaction PT = new PublishTransaction(item.Id, context.Session);– USER1287Commented Sep 15, 2015 at 12:08
1 Answer
It's not possible. The resolver doesn't know/care about the concept of Publish Transactions. To elaborate on this, the method signature Resolve
has 4 parameters, none of which you can use to somehow trace back the ID you are searching for. Also, take the following scenario for example, when in the Publish dialog you click Show items to publish
the resolver gets triggered, but there is no Publish Transaction yet because a Publish action is not yet saved. The Id is assigned upon saving.