Hi Derek,
The following link helped
variables do not respond
But I'm not able to put this to work...
I have a string field z_personal_tax_id that saves an id, and I want to set the customer of the ticket based on this field.
I create the following spel:
z_lookup_by_tax(...) {
string method;
method="z_lookup_by_tax";
string tax;
sn=argv[0];
object resultList;
logf(TRACE, "%s where clause: z_personal_tax_id=%s", method, tax);
send_wait(0, top_object(), "call_attr", "cnt", "sync_fetch", "STATIC", format("z_personal_tax_id = '%s'", tax), -1, 0);
resultList = msg[0];
if (msg[1] > 0) {
set_error(1);
set_return_data("");
} else {
set_return_data(msg[0]);
}
return;
}
In the text_api.cfg I set the following:
INCIDENT.TAX_CUSTOMER=customer.UUID.z_lookup_by_tax
But I'm getting an error in the log file:
Log:
domsrvr 7824 ERROR top_ob.c 4030 Got msg with type set to 0
spelsrvr 2856 ERROR cr_chg_text_api.spl 1396 AHD58009:Could not create Incident. Reason: INVALID - AHD03123:Required attribute Affected End User is missing
Any idea how to solve this?
I'm stuck on this...
Thanks in advance