Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function executeRule(current, previous /*null when async*/) {
- sepRecs();
- function sepRecs(){
- //Retrieve user's company
- var userComp = gs.getUser().getCompanyID();
- var gr = new GlideRecord('core_company');
- if (gr.get(userComp)) {
- if (gr.u_is_seperated == true ) { //Separated data
- gs.log('HGC – Users Domain Separation logged in user is part of company ' + gr.name);
- var qc = current.addQuery('company', gr.sys_id );
- //If can see empty company
- if ( gr.u_can_see_empty_cie == true ) {
- qc.addOrCondition('company', '');
- }
- }
- }
- }
- })(current, previous);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement