- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 12:38 AM
Hi Team,
We have created a reference field (BIA Knowledge Article) in business application cmdb form.It will shows the KB article display number in the field.
So, If KB article expire after 1 year - Then users are updating the KB article through portal.
But Here Its not taking the new updated version number. Its still showing the old version number
Its showing the updated display number in the search box - But its not taking the new value in the field. Still we are updating this process manually - Kindly please assist.
We have return After BR - But its not working as expected.
Thanks,
Sai
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2023 05:02 AM
Hi @babbi / @thaduri sai
Try the following code and check the system log, if you didn't find any of the log statement, it means the BR didn't ran, if it is running observer which log statement is not logged.
(function executeRule(current, previous){
var BIA = new GlideRecord("cmdb_ci_business_app");
BIA.addQuery('sys_id', current.cmdb_ci);
BIA.query();
gs.info('Before BIA IF Condition');
if(BIA.next()){
gs.info('Found BIA');
BIA.setValue('u_bia_knowledge_article', current.getUniqueValue());
vat update_res = BIA.update();
if(update_res){
gs.info('Updated BIA KB Successfully');
} else{
gs.info('Updated BIA KB Failed');
}
}
})
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2023 06:49 AM
@thaduri sai That Great 😀 I'm glad it helped!
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 04:57 AM
Hi @AnveshKumar M ,
Hope you are doing fine.
Here below we have return After BR :-
When knowledge article updates - The automacally the new display version number is taking in BIA Knowledge field. working as expected.
But when we are re-loading the page of business application. The Last BIA Approval (date) field is not taking as expected.
Could you please help on this @AnveshKumar M ,
Thanks for the advance.
Thanks,
Sai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 03:06 AM
Hi @thaduri sai
I didn't get what you mean by reloading the page, is it just the browser refresh?
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 03:14 AM
Try changing the line 12 as below,
BIA.setValue("u_last_bia_approval", current.getValue("published"));
Anvesh