I'm not sure, but I thought the issue was just with accessing custom field on the item from the transaction line, which in general is problematic with the templates. Using the formula field, you'd be removing a level of joins, so it would just be
item.customfield.url
However, I don't have anything set up like this to test it out, but hopefully that works.