Hi Paulo,
Perhaps the following will help:
#define SYNTAX STRICT
int lookup_matchingID_by_symbol(string symbol, string obj_type, object obj, string attribute) {
string method;
method = "lookup_matchingID_by_symbol";
int matchingID;
logf(MILESTONE, "%s: Entering method: %s", method, symbol);
logf(VERBOSE, "%s: obj_type=%s", method, obj_type);
logf(VERBOSE, "%s: attribute=%s", method, attribute);
logf(VERBOSE, "%s: obj.id=%s", method, obj.id);
matchingID = (int)expand(format("&{'%s' = z_custom_table.sym->id}", symbol));
if (is_null(matchingID)) logf(MILESTONE, "%s: %s not found", method, symbol);
else logf(MILESTONE, "%s: %s found", method, symbol);
return matchingID;
}
I offer this as an example and do not warrant its use.
Cheers,
Lindsay
------------------------------
Lindsay Estabrooks
Principal Consultant
IT-EDU Consultants
------------------------------
Original Message:
Sent: 08-19-2019 09:42 AM
From: Paulo Freire Ferrarini
Subject: Text API method
Hi
I need to create a new method, but tye link for third party not helped.
I was not able to create the method according this site.
Original Message:
Sent: 08-19-2019 12:52 AM
From: Kyle R
Subject: Text API method
Hello Paulo,
Check out the Keyword Conversion Methods here:
https://docops.ca.com/ca-service-management/17-2/en/reference/ca-service-desk-manager-reference-commands/technical-reference/ca-sdm-text-api-interface#CASDMTextAPIInterface-KeywordConversionMethods
And look at the existing text_api.cfg for "lookup" examples. You should find something similar.
Also, this is on a third party site, but it may be of interest:
http://greggsmith.net/wiki/index.php/Custom_Lookup_method_for_TextAPI
Thanks, Kyle_R.
Original Message:
Sent: 08-16-2019 02:24 PM
From: Paulo Freire Ferrarini
Subject: Text API method
I´m using maileater to open tickets in service desk and I use textapi to populate several ticket fields.
I have a custom field in call_req table that is an srel to another custom table.
I need to create a new method for textapi to populate this custom field with maileater, but I didn´t find information on how to create it.