Servicenow thoughts and quirks

Add attachments to Task via script


Add attachments to Task via script

So i wanted to add all the attachments that comes from the RITM the users create when opening a case from the portal. But i wanted to do it from a script which fits in a broder module im working on. So Servicenow have a convient way of doing that using the “GlideSysAttachments” API

I works like this, you query the attachments from the source table and copy all the attachments to the target table

…
Read more ⟶

Add Field From other table to list


The other day, I was creating a module under an application menu in ServiceNow that looks at the sc_task table with a filter for specific catalog items (cat_item). The client wanted the list to display the Requested For field (requested_item.requested_for). However, because that field isn’t directly on the sc_task table, I ran into a problem: I couldn’t find it using the normal Personalize List option.

So, I did what any sane person would do and asked my best friend, Google. That didn’t seem to get me very far at first—until I stumbled upon a ServiceNow Community post.

…
Read more ⟶