Is there a way to synch up tables from Prod to all sub instances?

JLeong
Mega Sage

Hi Guys,

Is there a way to sync up tables from Prod to all sub instances?

Tables like:

- sys_user_group
- sys_user_grmember
- sys_choice

Thank you!

Regards,
Jocelyn

 

 

1 ACCEPTED SOLUTION

BachAF
Tera Contributor

Hi Jocelyn,

There are multiple ways to synch up tables from Prod to other instances:

  1. Install Instance Data Replication (IDR) plug-in, you can purchase it from ServiceNow store. Product documentation is: https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/instance-data-replica...
  2. Request Cloning for your Prod instance.
  3. Perform XML file import.
  4. Create your own ServiceNow integration with the following steps:
  • Create Scripted Rest API and use POST method,
  • Create Business Rule or Flow Designer and define your trigger (i.e. when a new record in that particular table is created),
  • Create table for import set row,
  • Create transform map (i.e. source: your_scope_app.table, target: sys_user_group), please note if  you want the data to have the same sys_id across instances then you can do transform script before insert.

Hope my answers above help solving your need.

Thanks.

Bachtiar

 

View solution in original post

12 REPLIES 12

Hello @Bachtiar Farlin ,

As per your last line "please note if  you want the data to have the same sys_id across instances then you can do transform script before insert."

Could you please provide sample code of the transform script ?

 

Community Alums
Not applicable

See this DOC

which will tell you to do this: 

Enter the following script:

if (action == "insert") {target.setNewGuidValue(source.u_sys_id); }

Click Submit.

Cent
Tera Contributor

Hi @JLeong , 

May i ask what approach did you achieve for your requirement? thanks