I want to fetch some field on current table in knowledge approval flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2023 09:17 PM
Hi All,
We have oob workflow for Knowledge Article approval, in that I need to fetch the some field from the current table that is kb_knowledge. How I can do that in Approval-user step script.
Please guide
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2023 09:32 PM
you can use current key word to get any field value as mentioned below
current.getValue("state");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2023 09:36 PM
Hi @pandeyved ,
You can access kb_knowledge table variables with below script
var myVar = current.variables.variable_name;
Please mark it as solution proposed and helpful if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2023 10:09 PM
Hi @pandeyved
You can access the object current is available in the Additional approvers script.
So to get the value of some specific fields in the current Knowledge Article record, just simply use.
//get Knowledge Base sys_id
current.kb_knowledge_base;
current.getValue("kb_knowledge_base");
Cheers,
Tai Vu