worskpace ui action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 04:53 AM
Hello , i wrote this script in worskpace client script in a ui action but in the window i can't display the label "Do you want to continue?" what's the problem?
function onClick(g_form) {
var poursuivreText = 'Voulez-vous poursuivre?';
var fields = [
{
type: 'Label',
name: 'poursuivre_label',
label: 'Voulez-vous poursuivre?',
},
{
type: 'choice',
name: 'reason_code',
label: 'Motif d\'annulation',
value: getMessage(' -- None -- '),
mandatory: true,
choices: [
{
displayValue: 'Annulé par le demandeur_Indisponibilité',
value: '1'
},
{
displayValue: "Annulé par l'opérateur_ Reprogramation avec le demandeur ",
value: '2'
},
{
displayValue: "Annulé par l'opérateur_ Demandeur Absent",
value: '3'
}
],
},
];
g_modal.showFields({
title: "Annulation de RDV",
fields: fields,
size: 'lg',
cancelTitle: 'Cancel', // Custom text for the Cancel button
confirmTitle: "Confirmer l'annulation du RDV", // Custom text for the OK button
}).then(function (fieldValues) {
g_form.setValue('state', 'cancelled');
g_form.setValue('u_cancel_reason', fieldValues.updatedFields[1].value);
g_form.save();
});
}
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 10:48 PM
it seems that type is not supported
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 06:33 PM
I believe the supported type are textarea, choice, reference, boolean, and string.
See this (https://www.servicenow.com/community/next-experience-articles/how-to-use-ui-actions-in-workspaces/ta...) for additional details.