Hi guys,
Anyone have a working solution for retrieving the parent's asset name + id after a trigger has fired? This would be useful when using the "Send Email" action in the trigger, i.e. send an email to a set of users informing them that user x has commented on article y.
I tried using a hidden metadata value in the asset builder, but it appears the trigger is fired before the metadata value is populated because the keyword replacement returns an empty string (even though the value has been populated when you check via admin interface).
If you want to use a metadata field to store the data, try using a different trigger event. I'm guessing you're using "after asset built" which actually seems to fire in the middle of the asset being built (go figure) - I think the "link created" event might work for you, as if I remember correctly link creation happens right at the end after everything has been populated.
also: if you're not already using it - the system log is invaluable for debugging triggers.
[quote]
If you want to use a metadata field to store the data, try using a different trigger event. I'm guessing you're using "after asset built" which actually seems to fire in the middle of the asset being built (go figure) - I think the "link created" event might work for you, as if I remember correctly link creation happens right at the end after everything has been populated.
also: if you're not already using it - the system log is invaluable for debugging triggers.
[/quote]
Hi James,
Thanks for your reply.
I already tried Link Created and that event never fires on asset creation (not in 3.20.6 anyway) it only fires when an asset is "New Linked".
For the time being I may need to create a trigger which fires on a page load rather than on asset creation. That way I can just make a JS hack to make it work until I figure out another solution =\