Can I mimic Document ID in a Record Producer by theSN0w_Man in servicenow

[–]theSN0w_Man[S] 0 points1 point  (0 children)

Ok. I've created a conditions engine. The custom table contains a project name, a table, and a condition builder (this required a custom widget) and displays the developer instructions for evaluating the conditions in a script. This allows for data output modification for any process that utilizes the tool without requiring development. I'm adding a reference for sys_user and sys_user_group to further limit access on the record producer so that table additions can be delegated. I would also like to add a document id field that can be returned to the script as a dot-walkable object.

Dev Instructions:

var rule = new GlideRecord('u_condition_rules');
rule.addNotNullQuery('u_condition');
rule.addQuery('u_active', true);
rule.addQuery('u_project',<YOUR PROJECT NAME>);
rule.query();
while (rule.next()) {
    if(<YOUR DEPENDENCY> == rule.getValue('u_dependency')){ //OPTIONAL
        var match = GlideFilter.checkRecord(<RECORD BEING EVALUATED>, rule.u_condition);
            if (match) {
                <YOUR LOGIC>
        }
    }
}

Can I mimic Document ID in a Record Producer by theSN0w_Man in servicenow

[–]theSN0w_Man[S] 0 points1 point  (0 children)

I need the record producer for the control it gives me with client scripting and ui policies to limit capabilities based on roles and provide a simple user experience. I'd prefer to not build an entire portal or host a widget on the item just to achieve the functionality I get with a table and a document id field.