Field type "Document ID" to be used in a business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2018 03:42 AM
Hello All,
Could anyone help me to query on field type "Documnet id"?. I'm currently using below
(function executeRule(current, previous /*null when async*/) {
var gr1 = new GlideRecord("policy");
gr1.addQuery('number', current.number);
gr1.query();
while(gr1.next()){
var gr = new GlideRecord("sysapproval_approver");
gr.addQuery('document_id', current.sys_id);
gr.query();
while(gr.next()){
if(gr.state == "approved"){
current.state = "published";
current.active = true;
current.update();
action.setRedirectURL(current);
}
}
}
})(current, previous);
Here i'm not able to get into second while loop, field "document_id" is of the type "Document ID".
Sowmya
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2018 06:17 AM
Table: Policy
condition: state is awaiting approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2018 06:21 AM
Not familiar with that table and can't find one with that name in my developer instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2018 06:37 AM
Ah.. actual name is "sn_compliance_policy"