APIs exclusive to Add/Edit Request Form
Displays the widgets that are hidden by default in the request form right panel. You can call this API as per as your requirements.
Returns:
Promise - Resolved with Success or Rejected with Failure.
Syntax:
- SDP.showWidget().then(function(response) {
- console.log(response);
- }).catch(function(response) {
- console.log(response);
- });
Sample:
API Call
| Success Response
| Failure Response
|
SDP.showWidget().then(function(response) {
console.log(response);
}).catch(function(response) {
console.log(response);
});
| {
message: “The requested action performed successfully.”
}
| {
message: “This requested action is not supported in this view”
}
|
Hides the widgets that are displayed in the right panel of the request form. You can call this API as per as your requirements.
Returns:
Promise - Resolved with Success or Rejected with Failure.
Syntax:
- SDP.hideWidget().then(function(response) {
- console.log(response);
- }).catch(function(response) {
- console.log(response);
- });
Sample:
API Call
| Success Response
| Failure Response
|
SDP.hideWidget().then(function(response) {
console.log(response);
}).catch(function(response) {
console.log(response);
});
| {
message: “The requested action performed successfully.”
}
| {
message: “This requested action is not supported in this view”
}
|
SDP.setBadgeCount(count)
Displays the provided count as a badge near the widget name displayed on the request form. This count corresponds to a certain value that is used to notify the users, such as available entities or number of options that can be selected.
Parameters:
Name
| Type
| Description
|
count
| Integer
| The value to be displayed on the badge. If not passed, the badge will be hidden in the UI.
|
Returns:
Promise - Resolved with Success or Rejected with Failure.
Syntax:
- SDP.setBadgeCount(count).then(function(response) {
- console.log(response);
- }).catch(function(response) {
- console.log(response);
- });
Sample:
API Call
| Success Response
| Failure Response
|
SDP.setBadgeCount(10).then(function(response) {
console.log(response);
}).catch(function(response) {
console.log(response);
});
| {
message: “The requested action performed successfully.”
}
| {
message: “This requested action is not supported in this view”
}
|
Fetches a field value from the request form.
Parameters:
Name
| Type
| Description
|
field*
| String
| The name of the field
|
* - Mandatory parameter
Returns:
Promise - Resolved with Success or Rejected with Failure.
Syntax:
- SDP.getValueFromForm(field).then(function(response) {
- console.log(response);
- }).catch(function(response) {
- console.log(response);
- });
Sample:
API Call
| Success Response
| Failure Response
|
SDP.getValueFromForm(“subject”).then(function(response) {
console.log(response);
}).catch(function(response) {
console.log(response);
});
| {
value: “Error in connecting to certain websites/URLs”
}
| {
message: “This requested action is not supported in this view”
}
|
Sets a field value in the request form.
Parameters:
Name
| Type
| Description
|
field*
| String
| The name of the field.
|
value
| String
| The new value to be set in the field. If not passed, existing value will be removed.
|
* - Mandatory parameter
Returns:
Promise - Resolved with Success or Rejected with Failure.
Syntax:
- SDP.setValueInForm(field, value).then(function(response) {
- console.log(response);
- }).catch(function(response) {
- console.log(response);
- });
Sample:
API Call
| Success Response
| Failure Response
|
SDP.setValueInForm(“subject”, “Error in connecting to certain websites/URLs”).then(function(response) {
console.log(response);
}).catch(function(response) {
console.log(response);
});
| {
"message": "The requested action performed successfully"
}
| {
message: “This requested action is not supported in this view”
}
|
Related Articles
Form Rules
Form Rules allow you to define rules to automate certain actions on form fields based on custom conditions. Supported Form Types: Incident request forms, service request forms, change forms, problem forms, and release forms. Form Rules are executed ...
Add/Edit/Delete Service Desk Data
SDP.get(options) Fetch the widget data such as URLs, or any input data in the custom widget from the server. You can also perform a cross portal call from the custom widget using this function. Note that only SDP V3 APIs can be invoked using this ...
Add Worklogs
Work Logs show records of time spent by the technician on a problem and helps SDAdmins monitor the technicians' activities. In Work Logs, technicians can detail their work, specify the time it took to address the request, and also mention any ...
Edit Requests
Role Required: Technicians with permission to edit requests Edit an Individual Request Go to Requests and choose the respective customer from the drop-down in the header. Open the request that you want to edit. Click Edit at the top of the page to ...
Request Tasks
Sometimes, multiple technicians work on a request. In such cases, the request can be divided into several tasks, and each task can be assigned to a technician/group. Add Tasks to Request Role Required: Technicians with Adding/Editing Request Task ...