How can I print out a message in the system log?

med1
Kilo Contributor

Hi all, Im new to ServiceNow I would like some help with:

How can I print out a message in the system log?

The workflow assigned to this catalogue item should print out a log in the system logs to say "User <name of the user> has ordered more <RAM or CPU> for server <server name>". The same message should be written also in the Work Notes field of the Requested Item. Set the

state of the RITM to Closed complete after writing the messages in the previous step.

Many thanks!

 

30 REPLIES 30

Hi, 

I don't get what you mean with workflow run the script. 

find_real_file.png

Hi,

you must have associated workflow to your catalog item.

Once you link workflow with catalog item.

Now when you submit catalog item it would trigger the workflow

Within that workflow you should use run script activity

Run Script workflow activity

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Im sorry, I can't find what you are trying to assist me with. 

The run script workflow activity link has very little info to help me further.

Would you mind to be more specific? Im just new with ServiceNow. But im doing my best!

 

So what I have trouble with from your reply:

 

Within that workflow you should use run script activity

Is this what you mean with linking to catalog item (I chose a random one, Or should i make a new one?)

find_real_file.png

 

Hi,

So you have workflow associated to your catalog item as per above image

Now open that workflow from workflow editor

Checkout that workflow

Then use run script activity and add the script

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Why can't I drag the run script to the canvas?