Basic question: using arguments in callbacks

Hi all,
I’m making a callback to display ticket history in Update.html, using the AfterForm callback. I know how and where to make the file I need, but I’m not sure how to access arguments.

Specifically, $TicketObj is causing an error in my callback file. I see that there’s an argument for this callback called Ticket, but how do I access it? In my file, do I use $Ticket, or Ticket, or @args{Ticket}, or something else? Thanks.

Hey Alex,

Not sure if this will help, but I inserted the Custom Fields into the Update.html page (before I found the extension), and my callback looked like this:
$m->comp("/Ticket/Elements/EditCustomFields", TicketObj => $ARGS{'Ticket'}, AsTable => 1);

-Sean

Thank you! Using $ARGS{‘Ticket’} worked to give my callback the ticket object, and history is now displaying in the update page. Plus I now know how to access arguments given to callbacks.

@Alex_Hall would you be so kind as to share your mod on the wiki?
Thank you in advance!

It’s not exactly complete, or I would. I hard-coded it to use scrolling history, since I know all the people in our small company use that. The other history display options needed even more arguments, and I didn’t know if my callback would have access to everything they needed to work correctly. All I did was paste the scrolling history display code from Display.html into my callback, modif6ing it to use the ticket code you suggested I try.