- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2022 02:51 AM
Incident number in subject should be readonly for user.
Even if user make changes, if not only then also only incident number should be sent to recipient of the mail.
Thanks in advance.....
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 08:02 AM
Sure I'll help, but still, I must point out that I think it would be better to teach your users. 🙂
Script as follows
(function executeRule(current, previous /*null when async*/) {
// checks if the subject contains "INC" and if not, try to add the INC-number from matching record
if (current.getValue('subject').indexOf('INC') == -1) {
var incGR = new GlideRecord('incident');
if (incGR.get(current.getValue('instance'))) {
var incNumber = incGR.getValue('number');
current.setValue('subject', current.getValue('subject') + ' ' + incNumber);
}
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2022 03:00 AM
You cannot make incident number read only in subject. You have to communicate the users not to remove the incident number from the subject in the email body itself.
add ${number} in the subject to add incident number

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2022 03:01 AM
Hi you can add ${number} in the email client subject
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2022 03:18 AM
Hi,
You are talking about the email client, right?
This is a OOB UI page(?), which gets loaded with some parameters from the currently opened task record.
It should not be changed.
Instead you can write a business rule, that makes sure that the subject line always contains the record number. But that would be a quite complex solution for a very small gain.
Might be easier to teach your users to not alter the subject line, or to remember to include the record number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 04:17 AM
Hii,
Can you help me with business rule???