top of page
Writer's picturesajan Allan Roy R

Create multiple records using record producer


This is from ServiceNow Witchdoctor's channel. Found quite a few things that are worth sharing, though being very small items these tips helped me learn and I will possibly apply them when needed:


The idea is to create a record (say incident) and associate another record (say new incident task) to it.


A typical SN person like me would opt for writing scripts on the record producer configuration record - in the script field that's present there (the one that runs after the rp submission).


BUT, ServiceNow has evolved tremendously over time, so it's high time we look for the best possible/relevant method.


The way this was handled:

  1. Create the record producer (duh!)

  2. Familiarize with this wonder-table called 'sc_item_produced_record'

  3. Write a flow using flow designer - to run on the target record creation (say incident).

  4. Lookup record on the sc_item_producer_record that matches with the target record sys_id - this way we will know if there is an incident created from this record producer.

  5. Create the desired new record (say incident task) and associate it with the incident.

  6. Feel content that you accomplished this with such minimal coding.


Item Producer Records table:

  • This table holds records that are created through a record producer.

  • May come in handy to identify if incidents or any task records were created by agents or via a record producer.

  • This can be utilized to segregate task records based on their source of creation and add validations accordingly.

Things i learned:

  • You don't have to write scripts for everything :)

  • 'sc_item_produced_record' table helps identify task records originating from record producers

  • The 'Get catalog variables' action on flow designer also works for non-RITM records, in this case, it worked for the incident record.

  • The record producer name needs to be put in the place of 'Template' in the 'Get catalog variables' action.

  • 'Look-up records' action is a very powerful replacement for glideRecord; manipulations can be done based on the 'count' it returns.

  • Testing a flow designer is making real-time updates :)

236 views0 comments

Recent Posts

See All

Zing search - some basics

Zing Search Engine: · This is SN’s search engine completely built in-house for SN. Search result mechanism: Zing search primarily relies...

Comments


bottom of page