How to get Multiple Line Text Prompt on service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2021 12:29 AM
Hello, I have a prompt on service portal that when approver clicks on reject widget, it show to enter mandatory comment in single line text. I want is multiple line text. How can I achieve this?
Server script of widget is:
if (input) {
// update pagination
currentPage = input.pagination.currentPage;
initRow = (currentPage * maxNumberOfItemsInTheList);
lastRow = initRow + maxNumberOfItemsInTheList;
if (input.op == 'approved' || input.op == 'rejected') {
var app = new GlideRecord("sysapproval_approver");
if (app.get(input.target) && app.state.canWrite()) {
app.state = input.op;
if(input.op == 'rejected')
{
app.comments = input.reject_comment;
}
app.update();
}
}
}
Client Script of widget is:
$scope.reject = function(id, esigRequired) {
spModal.open({
title: 'Reject Approval',
message: 'Please enter your reason for rejection, note this will be communicated with the requestor',
input: true,
value: $scope.name
}).then(function(name) {
$scope.name = name;
var requestParams = {
username: $scope.data.esignature.username,
userSysId: $scope.data.esignature.userSysId
};
if($scope.data.esignature.e_sig_required && esigRequired) {
spUIActionsExecuter.executeFormAction(ESIGNATURE.REJECT_SYS, "sysapproval_approver" , id, [] , "", requestParams).then(function(response) {
});
} else {
$scope.data.op = "rejected";
$scope.data.target = id;
$scope.data.reject_comment = "Rejection reason: " + $scope.name;
get();
}
});
};
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2021 11:41 AM
Try this
'Please enter your reason for rejection \
note this will be communicated with the requestor';
you can use \ between words to break lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2021 09:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2021 09:11 AM
That can not be possible in spModal to show multi-line text in the prompt you have to go for customized modal window.
I found this I hope it's the same as per your requirement, this might help you