- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 01:00 PM
Hello,
I need some assistance setting a field inside my BR.
The value of Event type 2 needs pushing to a field on the user form. Can I do that by dotwalking to it?
Here is my code:
(function executeRule(current, previous /*null when async*/) {
var event = new GlideRecord('u_insider_risk_population_management');
event.addQuery('x_lbg_insider_risk_eventtype1', 'Vetting');
event.addQuery('x_lbg_insider_risk_eventoutcome2','Complete');
event.query();
while (event.next()) {
//gs.info("AB 30_06 " + event.getRowCount());
event.setValue(current.u_user.x_lbg_insider_risk_vetting_type, current.x_lbg_insider_risk_eventtype2);
event.update();
}
})(current, previous);
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 01:31 PM
No, you cannot as you need to force update the value on the user table but with dot-walking you won't have access to user table object that help you with updating the value after setting that.
You can do something like this
while(event.next()){
var userGr = current.u_user.getRefRecord(); // get users glide record.
userGr.setValue('x_lbg_insider_risk_vetting_type', current.x_lbg_insider_risk_eventtype2);
userGr.update();
}
Please mark this correct & helpful if it answered your question.
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 01:38 PM
Perfect, thank you Sharjeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 06:16 AM
I need to do the same thing but in a catalog client script. following your logic i tried :