- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2024 02:13 PM
How can we solve this.. I am getting so much confusion on this.
When a record is created from another record, update the description of the new record with existing description + this record has been created with the Incident number.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 06:57 PM
update as this
(function executeRule(current, previous /*null when async*/) {
var newRecord = new GlideRecord('incident');
newRecord.initialize();
newRecord.description = current.description;
newRecord.short_description = 'this record has been created with the ' + current.number;
newRecord.insert();
}
)(current, previous);
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 04:45 AM
You could add this to the UI Action or other script that is creating the record. Otherwise, a Business Rule before insert on the table of the record that is being created will do it. Add a filter condition for whatever field contains the incident number is not empty, then you can write a script to look up the record that has the existing description to populate on the new record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 05:19 AM
Can it be achieve by using business rule? If yes then can you please tell me how.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 05:07 AM
So a couple things...
1) What records are you talking about specifically. Because there are task types where you wouldn't want to do this.
2) What do you mean "created from another record"? Are you talking about something in the related list? Are you referring to some kind of "copy" button?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 05:18 AM
Its like suppose , we have a record in incident table and we want to create new record from that record, and in new record short description its should be written as "This record has been created with the +incident.number.