data policy on knowledge base
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2016 02:23 AM
HI,
There is a data policy on knowledge called Enforce Knowledge Base Field. It is setting knowledge base mandatory while inserting the record.
Problem Create Knowledge business rule is inserting the knowledge from a closed problem and it is setting the value of knowledge base:
kb.kb_knowledge_base = gs.getProperty("glide.knowman.task_kb", "dfc19531bf2021003f07e2c1ac0739ab");
I want knowledge base field to be empty and mandatory while creating the knowledge article from problem. Otherwise it should be working as it is.
How to give this condition ? I have tried to write an insert business rule, But it is throwing data policy exception from Enforce Knowledge Base Field
(function executeRule(current, previous /*null when async*/) {
var ob = new GlideRecord('problem');
ob.addQuery('sys_id',current.source);
ob.query();
if(ob.next()){
current.kb_knowledge_base ='';
}
})(current, previous);
Please help me out in this.
Regards,
Anasuya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2016 07:12 AM
The moment i posted, I realised i misunderstood your question.
Answer has been already provided by Abhinandan and Deepa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2016 01:25 AM
Hi Anasuya,
Did the proposed solution work out? If yes ,please mark Correct to close this thread...
Thanks,
Deepa