Copy Attachments from one table to another | Before Business Rules | ServiceNow

Опубликовано: 16 Октябрь 2024
на канале: LearnIT
1,652
29

For More Information, please check details below:

In this session, I have explained how to Copy Attachments from one table to another using Business Rules.

==========================BUSINESS RULES============================

Table - Requested Item
When to Run - Before Update
Condition - Send Attachments to True
Scripts -
(function executeRule(current, previous /*null when async*/ ) {

// Add your code here
var copy = new GlideRecord('problem');
copy.addQuery('parent', current.getUniqueValue());
copy.query();
if (copy.next()) {
GlideSysAttachment.copy('incident', current.getUniqueValue(), 'problem', copy.getUniqueValue());
}
})(current, previous);

If you have any feedback related to the scripting part, please write it in the comment box.

My Playlists for Quick Access for Various Learning Paths:

ServiceNow Interview Questions -    • Playlist  

ServiceNow Scenario Based Solutions -    • ServiceNow Scenario Based Solutions  

ServiceNow Scripting -    • ServiceNow Scripting  

ServiceNow Advanced Concepts -    • ServiceNow Advanced Concepts  

ServiceNow Concepts -    • ServiceNow Concepts  

ServiceNow Tips & Tricks -    • Playlist  

ServiceNow San Diego Release -    • ServiceNow San Diego Release  

ServiceNow Basics & Overview -    • ServiceNow Basics & Overview  

ServiceNow App Engine Studio -    • ServiceNow App Engine Studio  

ServiceNow Shorts -    • ServiceNow Shorts  

#servicenow #learnit #learnitbyprashant

Thanks for Visiting my Channel . Here I will be sharing all kinds of technical Knowledge. Anyone can connect with me directly for anything as part of ServiceNow Related Query.

Keep Supporting me so that I can continue to provide you good content each time!!😇🙏

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Thank you for Watching My Videos!!!
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬