chrome_tab for creating a new knowledge base article

RussLaPlante
Tera Expert

I want to be able to click on the "+" tab in SOW to create a new KB article, presenting users with the window to choose the knowledge base they want to add the article too. 

I'm seeking help with formatting the JSON. I can create an article in the default kb with this JSON:

 

{
"label": {
"translatable": true,
"message": "New Knowledge Article"
},
"routeInfo": {
"route": "record",
"fields": {
"table": "kb_knowledge",
"sysId": "-1"
},
"multiInstField": "sysId",
"condition": {
"tableDescription": {
"table": "kb_knowledge",
"canCreate": true
}
}
}
}

 

But I want to present the "Create Article" window that asks which article and template we want to use:

RussLaPlante_0-1716315514279.png

I reached the above window by going to my list of KB articles and clicking the New button.

Any ideas?

 

1 ACCEPTED SOLUTION

Thanks so much for your help James! I have this working now.

 

I made one small mod after your suggestion. Here's my config to end the discussion:

 

"label":{
"translatable":true,
"message":"New Knowledge Article"
},
"routeInfo":{
"route":"kb_template_selector_modal",
"fields":{
"table":"kb_knowledge"
},
"multiInstField":"sysId"
},
"condition":{
"tableDescription":{
"table":"kb_knowledge",
"canCreate":true
}
}
}

View solution in original post

8 REPLIES 8

@RussLaPlante  - you are missing a comma after "route": "kb_template_selector_modal"

Try the following instead - 

{
   "label":{
      "translatable":true,
      "message":"New Knowledge Article"
   },
   "routeInfo":{
      "route":"kb_template_selector_modal",
      "fields":{
         "table":"kb_knowledge",
         "sysId":"-1"
      },
      "multiInstField":"sysId"
   },
   "condition":{
      "tableDescription":{
         "table":"kb_knowledge",
         "canCreate":true
      }
   }
}

 

Thanks so much for your help James! I have this working now.

 

I made one small mod after your suggestion. Here's my config to end the discussion:

 

"label":{
"translatable":true,
"message":"New Knowledge Article"
},
"routeInfo":{
"route":"kb_template_selector_modal",
"fields":{
"table":"kb_knowledge"
},
"multiInstField":"sysId"
},
"condition":{
"tableDescription":{
"table":"kb_knowledge",
"canCreate":true
}
}
}

Fin Nguyen
Tera Guru

Hi @RussLaPlante and @James Chun ,

When we create a new Change Request, there is a screen like this which ask us to select the Type of CHG, where we can route the Create Change Request option to? like the way we route Create Knowledge Article to kb_template_selector_modal

Regards,
Fin Nguyen

Ruaa1
Tera Guru

Hello @RussLaPlante,

This is very helpful. Thank you for sharing.

 

One thing that I noticed is that after I click the "Create Article" button, the tab does not close, instead it stays opened and another tab opens up for the knowledge article record. Also, If I click the "Cancel" button, it doesn't do anything.

 

Is there a way to close it? Please see screenshot. 

 

Snag_5d6e183.png

 

Best regards,

Ruaa