Correcting The Script !!! (function executeRule(current, previous /*null when async*/) { var previousManager=previous.assignment_group.manager; var x=new GlideRecord('u_manager_details'); x.addQuery('u_manager_name',previousManager); x.query(); if(x.next()){ x.u_manager_name=current.assignment_group.manager.getDisplayValue(); x.update(); } gs.addInfoMessage("The current Assignment group manager is "+current.assignment_group.manager.getDisplayValue()); })(current, previous);
I have a doubt as I have seen many videos that Do not use current.update() before BR. But you are using that x.update.Can you please give clarification on this.....
Hi Ravi...the way u r teaching scripting, I think everyone will love coding. Finally I found best teacher to clear our basic concept in scripting. Stay blessed always👍
For "Demo Business Rule Manager Details" BRs you may want to make them "after" because otherwise if the incident insert or update transactions fail later in processing, you will end up with bad data in u_manager_details. I would make them async because I don't need to delay the interface load while I wait on u_manager_details transactions.
Many thanks for the passion and enthusiasm in your teaching style. Did everything exactly like you explained but the insert fails to work on the u_manager_details table. I'm using the Vancouver release. Any explanation for this?
Hi Ravi , In before Videos you said current.update() is not good practice. but we are using here . so we can use the update method inside the block like if , while condition ? please clarify
As usual, great video. 😀 i think, the video title is not match with content, it is before business rule, but not Display business rule. Please check it and change the title please. Ignore me if i am wrong. Thanks for the video. 😀👍
Hi Ravi, Thanks for this videos To fulfill this requirement of the scenario, cant we use a single business rule i.e. demo business rule manager details by checking the insert and update checkbox and add same condition in the BR to insert the record over two separate BRs for insert and update.
hi, if a user added to group then manager will have to get an email like ,a new user is added to group. how can we achieve this by using after business rule
(function executeRule (current, previous /*null when async*/ ) { var previousManager = previous.assignment_group.manager; var x = newGlideRecord('u_manager_details'); x.addQuery('u_manager_name', previousManager); x.query(); if (x.query()) { x.u_manager_name = current.assignment_group.manager.getDisplayValue(); x.update(); I } gs.addInfoMessage('The Current assignment group manager is + current.assignment_group.manager. getDisplayValue());
Taking 'after' condition below code is not working-u_profile is a customer field pointing sys_user.Table is incident (function executeRule(current, previous /*null when async*/ ) { if (current.u_profile == current.caller_id) { var gr = new GlideRecord('sys_user'); gr.addQuery('sys_id', current.u_profile); gr.query(); while (gr.next()) {
current.short_description =gr.email; gs.addInfoMessage('Email of the user: -' +gr.email); } }
I treid it but got the sys_id which is the current assignmenta8f98bb0eb32010045e1a5115206fe3a,what can i add to make the name show instead of the ID.Please
I watched most of your videos and they are easily understandable this one i did not get it. specially from the table. u_manger_details. i would say its better to use table whatever already exist in sn and zooming where you typing would increase the video quality, just a suggestion.thanks
Hi @Ravi what’s the WhatsApp number for me to join the group cos when I click on the link it doesn’t take me directly to the group even though I have WhatsApp installed
Correcting The Script !!!
(function executeRule(current, previous /*null when async*/) {
var previousManager=previous.assignment_group.manager;
var x=new GlideRecord('u_manager_details');
x.addQuery('u_manager_name',previousManager);
x.query();
if(x.next()){
x.u_manager_name=current.assignment_group.manager.getDisplayValue();
x.update();
}
gs.addInfoMessage("The current Assignment group manager is "+current.assignment_group.manager.getDisplayValue());
})(current, previous);
I have a doubt as I have seen many videos that Do not use current.update() before BR. But you are using that x.update.Can you please give clarification on this.....
Brother.., You're really amazing. I have never seen ever like this kind of teaching you have amazing stuff👌👌
this code is not working. not going inside the if condition.
I tried this updated code only.
But if I change the assignment group the manager name is not changing.
Hi Ravi...the way u r teaching scripting, I think everyone will love coding. Finally I found best teacher to clear our basic concept in scripting. Stay blessed always👍
Thanks a lot for the appreciation 👍
@@learnservicenowwithravi bhai working code hai kya, kuchbhi sikhate ho
For "Demo Business Rule Manager Details" BRs you may want to make them "after" because otherwise if the incident insert or update transactions fail later in processing, you will end up with bad data in u_manager_details. I would make them async because I don't need to delay the interface load while I wait on u_manager_details transactions.
Finally got a perfect teacher to learn snow.
Thanks for your feedback ❤️
Badhiya
Many thanks for the passion and enthusiasm in your teaching style. Did everything exactly like you explained but the insert fails to work on the u_manager_details table. I'm using the Vancouver release. Any explanation for this?
Can you ping the script please
the way ur explaing is too good upload more videos related ITSM and GRC
Thanks Kavya
Waiting bro, please upload every day
Its Difficult everyday.. But in a week sure 3-4 videos I will bring
@@learnservicenowwithravi but now in a week you are uploading only one video
Hi @Ravi
Need
1. Discovery
2. Service Mapping
Videos
After this scripting series..
Hi Ravi , In before Videos you said current.update() is not good practice. but we are using here . so we can use the update method inside the block like if , while condition ? please clarify
Simply super 😊
Thanks
👏
As usual, great video. 😀
i think, the video title is not match with content, it is before business rule, but not Display business rule. Please check it and change the title please. Ignore me if i am wrong.
Thanks for the video. 😀👍
Thanks for feedback and suggestions..In the beginning I used display business rule and after I use real time scenarios..
Hi Ravi, Thanks for this videos
To fulfill this requirement of the scenario, cant we use a single business rule i.e. demo business rule manager details by checking the insert and update checkbox and add same condition in the BR to insert the record over two separate BRs for insert and update.
Try it .. there could be potential possibilities if there are two tables then I would have used
Hi Ravi, What is the diff between Business rule under admin and BR under system definition?
Both are same only .. just check the filter
Also Why we need Business Rule ..can't we do it in one Business rule ? can you please tell me the use of 2 BR ?
Please join the group of mine.. and ask there it will be easy to get the response
All good . but the manager table is not updating when a new assignment group is selected in the incident table
Code send please?
Hi Ravi
I had one doubt here at 12:20, you said we need to check the previous manager. I wanted to know why we are checking for the previous manager?
To just check what previous value it was holding
hi,
if a user added to group then manager will have to get an email like ,a new user is added to group.
how can we achieve this by using after business rule
Use events for notifications and write a br
TIL how to insert a new record in the manager table
and also how to update the manager name in the manager table
if you more number of data by Using import set add the new record to manager
or
individual data can be directly loaded to the tabel
@@learnservicenowwithravi interesting 🤔
After update in incident table it is not updating in manager table? I am facing this issue please help me with it
Your script??
(function executeRule (current, previous /*null when async*/ ) {
var previousManager = previous.assignment_group.manager;
var x = newGlideRecord('u_manager_details');
x.addQuery('u_manager_name', previousManager);
x.query();
if (x.query()) {
x.u_manager_name = current.assignment_group.manager.getDisplayValue();
x.update();
I
}
gs.addInfoMessage('The Current assignment group manager is + current.assignment_group.manager. getDisplayValue());
Taking 'after' condition below code is not working-u_profile is a customer field pointing sys_user.Table is incident
(function executeRule(current, previous /*null when async*/ ) {
if (current.u_profile == current.caller_id) {
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id', current.u_profile);
gr.query();
while (gr.next()) {
current.short_description =gr.email;
gs.addInfoMessage('Email of the user: -' +gr.email);
}
}
Please contact me on 8147251985
Group link not working
Check the latest video for link.
Or chevk Linkdein
th-cam.com/video/JFwu0KsYy4w/w-d-xo.html
Bro plese go slowly plese
Ok sorry.. Please set the speed to 0.8 that will help
How do you create that watermark field in incident table?
Just a normal colum I created watermark
Data I set with the help of display BR
no clarity in the video
Thanks for the feedback.. tell me what you don’t understand
I treid it but got the sys_id which is the current assignmenta8f98bb0eb32010045e1a5115206fe3a,what can i add to make the name show instead of the ID.Please
Use dot walk or getDispalyValue()
I watched most of your videos and they are easily understandable this one i did not get it. specially from the table. u_manger_details. i would say its better to use table whatever already exist in sn and zooming where you typing would increase the video quality, just a suggestion.thanks
Thanks for the suggestion.. I don’t edit the videos so its raw footage.. I will keep in my mind
Hi @Ravi what’s the WhatsApp number for me to join the group cos when I click on the link it doesn’t take me directly to the group even though I have WhatsApp installed
You can ping me on 8147251985