---
sourceDocument: Australia ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/servicenow-platform

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Create a UI action to enable creating knowledge articles from HR cases

# Create a UI action to enable creating knowledge articles from HR cases {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

Create a UI action to add the Knowledge check box to the HR case form.

## Vorbereitungen

Role required: admin

Ensure that the Developer Application
is set to Human Resources: Core.

## Prozedur

1. Navigate to AllSystem UIUI Actions.
2. Click New.
3. Fill in the following fields.  
   {#ui-action-hrcase-article__table_ghz_k2w_cgb__entry__2}

   | Field | Description |
   |-|-|
   | Name | Create Knowledge |
   | Table | HR Case |
   | Action name | create_knowledge |
   [Tabelle : 1. UI Action form]

   {#ui-action-hrcase-article__table_ghz_k2w_cgb}
4. Select the Client check box.
5. Select the List v3 Compatible check box.
6. Select the Form button check box.
7. In the Onclick field, enter <kbd class="ph userinput">createKnowledgeClient()</kbd>.
8. In the Condition field, enter <kbd class="ph userinput">gs.getProperty("sn_hr_core.enable_kcs_hr") == 'true' &amp;&amp; new global.CSMTableMapUtil (current).findMapByName("sn_hr_core.hr_case_kcs_article") &amp;&amp; new global.KBKnowledge().canCreate()</kbd>.
9. In the Script field, enter the following code.  

       function createKnowledgeClient() {
           if (g_form.modified) {
               alert(new GwtMessage().getMessage('You have unsaved changes. Please save them to continue.'));
           }else{
               //Call the UI Action again but skip the 'onclick' function
               gsftSubmit(null, g_form.getFormElement(), 'create_knowledge');
       //MUST call the 'Action name' set in this UI Action
           }
       }

       //Code that runs without 'onclick'
       //Ensure call to server-side function with no browser errors
       if (typeof window == 'undefined')
           CreateKnowledgeServer();

           function CreateKnowledgeServer(){
           current.update();

           var map = new global.CSMTableMapUtil (current);
           map.findMapByName("sn_hr_core.hr_case_kcs_article");
           var targetURL = map.getTargetURL();
           var referenceLink = 
       "&sysparm_collection=sn_hr_core_case&sysparm_collectionID="+current.sys_id+"&sysparm_collection_key=task&sysparm_link_collection=m2m_kb_task&sysparm_collection_related_field=kb_knowledge&sysparm_referring_url=sn_hr_core_case.do%3fsys_id%3d"+current.sys_id;
           if(targetURL)
               action.setRedirectURL(targetURL[0]+referenceLink);
       }

10. Click Submit.
{#ui-action-hrcase-article__steps_ypb_3vk_dgb}

