This document provides a step-by-step procedure for using a string-type custom field with the pdm_text_cmd.
The basic solution is to add the relevant entry to $NX_ROOT\site\mods\text_api.cfg,.
If necessary, create your own custom method and reference it in the entry - the details of how to do that are not included here.
- Using Web Screen Painter, create your custom field using Tools -> Schema Designer. Save and Publish the change. Recycle Service Desk Manager services.
In my test, I created the custom field as follows:
Right-click on cr in the object listing that appears on the left panel of the Schema Designer. Select: Add Column. Enter the column name, test1, in
the New Column Name field that appears in the popup window and click OK. In the right panel, the Column Info tab for ztest1 should now open. In the
Field Type, select STRING from the dropdown, and for the String Length, enter: 30
- Copy $NX_ROOT\site\text_api.cfg to $NX_ROOT\site\mods\text_api.cfg.
- Edit the new file, $NX_ROOT\site\mods\text_api.cfg. Search for "INCIDENT.STRING6=string6.STRING". Insert the following line after that
In my test, I also searched for "REQUEST.STRING6=string6.STRING" inserted this line after it:
- Stop Service Desk Manager services.
- Start Service Desk Manager services.
- To test out the usage of the custom field, create the following file in the current directory, $NX_ROOT\site\mods:
and have it contain only these 5 lines:
- Run the following command:
pdm_text_cmd -f test1.txt -u ServiceDesk -t REQUEST
- As a result of the previous step, you should receive these messages:
AHD58021:Successfully Created Request 61.
- Log into Service Desk and confirm that the ticket was created.
- If you have the custom field added to the CA Service Desk Manager graphical user interface (GUI), you can now verify the value of the field in the incident that was created (in the example above, this is Incident 61). If you don't have the custom field available to you via the GUI yet, you could check the Call_Req table in the database directly or run a pdm_extract command to retrieve the corresponding Call_Req data for the new ticket.