Blog Post created by TMACUL Champion on Jan 1, 2016

Action Macro to Log Solution and Resolve Ticket


From SDU

Jump to: navigation, search


To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.



This Article provides the syntax for adding an Action Macro that will log a solution and Resolve the ticket. This Action Macro has been scripted to process the content of the Event's Text field as the solution to be used. This allows for this Macro to be used for multiple Events and generate different results.


Step 1. Upload New Action Macro

The first step is to add the new Action Macro. This is done via a data load since Service Desk does not provide a GUI method of created or updating Action Macros.


Create a text file using the following syntax:


TABLE Spell_Macro

del description fragment lock_object msg_html ob_type sym type


{ "0" ,"add a log solution activity log entry and set status to resolved",

"uuid log_userid;\\0012log_userid = (uuid)\"793ED69B4E87A545BD8E911834D829FC\";\\0012\\0012string log;\\0012log = expand(event_tmpl.user_smag);\\0012send_wait(0, this, \"log_solution\", (string)group_leader, log_userid, log, \"PDM\",\"\");\\0012if (msg_error()) {\\0012 logf(ERROR, format(\"Macro event error '%s'\", msg[0]));\\0012}\\0012\\0012if (soln_log.length != 0) {\\0012 status = \"RE\";\\0012}\\0012\\0012",

"0" ,"" ,"cr" ,"Add Solution and Resolve", "ACT" }


Then run the following command:
pdm_load -f yourfile.txt -i -v 

Here is what the script looks like:

uuid log_userid;

log_userid = (uuid)"793ED69B4E87A545BD8E911834D829FC";


string log;

log = expand(event_tmpl.user_smag);

send_wait(0, this, "log_solution", (string)group_leader, log_userid, log, "PDM","");

if (msg_error()) {

logf(ERROR, format("Macro event error '%s'", msg[0]));



if (soln_log.length != 0) {

status = "RE";


Step 2. Using the New Action Macro


r11.x Screenshot - Event Configuration
r11.x Screenshot - Event Configuration


To use this Action Macro you simply add it to the desired Event. Within the Text field of the Event you add the syntax you want to be added as the solution that is to be displayed in the Activity Log.