CustomFields_Delete Operation

Applies to QAComplete 14.3, last modified on February 19, 2024

Deletes a custom field specified by its number from the specified QAComplete project and area (Defects, Requirements, and so on).

Note: Deleting a custom field also clears the contents of that field for all items in that project area.

Requirements

The user must belong to a user group that has the Manage custom fields privilege.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object that specifies the login information and the ID of the project that has the custom field.

Entity  :  string, required

The project area that contains the custom field you want to delete. Possible values:

  • Bugs (defects)
  • Contacts
  • FileExchanges (shared documents)
  • FunctionalSpecs (requirements)
  • ProjectPlans
  • ProjectPlanTasks
  • ProjectTasks (agile tasks)
  • Releases
  • TestCases (legacy test cases used in release 9.6.0 and earlier)
  • TestConfigurations
  • Tests
  • TestSets

CustomFieldNumber  :  integer, required

The number (index) of the custom field to delete, from 1 to 90.

Result

None.

Example

Sample Code

This example deletes a custom field at number 1 from Defects.

C#

string login = "[email protected]";
string password = "p@ssword";

string entity = "Bugs";
int fieldNbr = 1;

ServiceSoapClient service = new ServiceSoapClient();

// Prepare AuthenticationData
LoginInfo loginInfo = service.GetLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.AppCode = loginInfo.AppCode;
authData.UserId = loginInfo.UserId;
authData.PassCode = password;
authData.DeptId = loginInfo.DeptId;
authData.ProjId = loginInfo.ProjId;

service.CustomFields_Delete(authData, entity, fieldNbr);

Java

String login = "[email protected]";
String password = "p@ssword";

String entity = "Bugs";
int fieldNbr = 1;

ServiceSoap service = new Service().getServiceSoap12();

// Prepare AuthenticationData
LoginInfo loginInfo = service.getLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.setAppCode(loginInfo.getAppCode());
authData.setUserId(loginInfo.getUserId());
authData.setPassCode(password);
authData.setDeptId(loginInfo.getDeptId());
authData.setProjId(loginInfo.getProjId());

service.customFieldsDelete(authData, entity, fieldNbr);

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 543 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/CustomFields_Delete"
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CustomFields_Delete xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Entity>Bugs</Entity>
      <CustomFieldNumber>1</CustomFieldNumber>
    </CustomFields_Delete>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 551 {Insert an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CustomFields_Delete xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Entity>Bugs</Entity>
      <CustomFieldNumber>1</CustomFieldNumber>
    </CustomFields_Delete>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 313 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CustomFields_DeleteResponse xmlns="http://www.pragmaticsw.com/" />
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 323 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CustomFields_DeleteResponse xmlns="http://www.pragmaticsw.com/" />
  </soap12:Body>
</soap12:Envelope>

See Also

CustomFields_Add
CustomFields_AddLookUp
CustomFields_Load
Custom Field Operations
SOAP API Reference

Highlight search results