Add Short Description on Knowledge email script

Alex Edmiston1
Giga Guru

Hello -- I'm trying to add the short description field onto the below script but keep getting undefined on the message. Any ideas on what to change? 

 

find_real_file.png

1 ACCEPTED SOLUTION

Eric Viets
Mega Expert

I now just had the same problem and *finally* figured it out.

The code that needs to be modified is in: System Policy… Events… Script Actions.  Activity Fanout Manager for KM

In the function getKnowledgeObject() section, you'll want to add this line:

knowledge_obj.short_description = gr.getValue('short_description');

 

Then, in your notifications, you can add something like:

template.print("<b>Article title</b>: "+obj.short_description+"<br/>");

 

Please mark as helpful/correct answer.  Thanks!

And if someone can get this into baseline code, that would be even better!

View solution in original post

19 REPLIES 19

Eric Viets
Mega Expert

I now just had the same problem and *finally* figured it out.

The code that needs to be modified is in: System Policy… Events… Script Actions.  Activity Fanout Manager for KM

In the function getKnowledgeObject() section, you'll want to add this line:

knowledge_obj.short_description = gr.getValue('short_description');

 

Then, in your notifications, you can add something like:

template.print("<b>Article title</b>: "+obj.short_description+"<br/>");

 

Please mark as helpful/correct answer.  Thanks!

And if someone can get this into baseline code, that would be even better!

Thank you @Eric Viets this works perfectly!!

I don't have a "function getKnowledgeObject()" in my Script Actions for Activity Fanout Manger for KM. Do I still add it along with that function label??

 

Brandon

Update to this! Dive deeper into the SNC script include version and you'll see that the getKnowledgeObject() has Short Description mapped, but it's abbreviated in the object passed in event.parm2. It's listed out as obj.short_desc, not obj.short_description.

Thanks for this, Ryan.

Here's a screenshot of what you described above:

BrandonR1_0-1682005675545.png