Skip to content

Function: getRequestTypeFields() ​

ts
function getRequestTypeFields(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  canAddRequestParticipants?: boolean;
  canRaiseOnBehalfOf?: boolean;
  requestTypeFields?: object[];
}>;

Defined in: src/serviceDeskServer/api/requestTypes.ts:26

Returns the fields for a request type, for a given request type Id and service project Id. These are the fields that are required to create a customer request of that particular request type.

In addition, the following information about the current user's permissions for the request type is returned:

  • canRaiseOnBehalfOf field - Returns true, if the user has permission to raise requests on behalf of customers. Otherwise, returns false.
  • canAddRequestParticipants field - Returns true, if the user can add request participants. Otherwise, returns false.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ requestTypeId: string; serviceDeskId: string; }-
parameters.requestTypeIdstringThe id of the request type.
parameters.serviceDeskId?stringThe id of the service desk.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; canAddRequestParticipants?: boolean; canRaiseOnBehalfOf?: boolean; requestTypeFields?: object[]; }>