Notifications

117 views

Description


To preserve the Service Portal branding when cloning from prod to sub prod instance, identify the tables and records to preserve, then create a data preservers on the source instance.

Procedure


Identify the table and records in the instance that need to be preserved. In this example a customer wants to preserve the text warning "PLEASE NOTE THAT THIS IS NOT PRODUCTION" that is coming from the "HTML Template" field in the widget record. Because this widget does not exist in the source instance, the sp_instance table needs to be preserved as well.

If assistance is needed finding where a particular object is coming from, use the script below from the Chrome developer tools console, or create a task for CS-User Experience.

 
// BEGIN SCRIPT 
$("div [widget='widget']").css("border", "1px solid red").css("padding-top", "20px").css("position", "relative").each(function(i){ 
var scope = $(this).scope(); 
var widget = scope.widget; 
var elem = $("<div style='position: absolute; top: 1px; left: 1px'><a target='_blank' href='/$sp.do?id=widget_editor&sys_id="+ widget.sys_id+"'> "+ widget.name +"</a>&nbsp;&nbsp;</div>"); 
var printScope = $("<a href='javascript:void(0);'>Print scope</a>").on('click', function(){ console.info(scope); }); 
elem.append(printScope); 
$(this).append(elem); 
}); 
 
// END SCRIPT 
 
This will outline all the widgets on the page and give you a clickable link to go to that widget.

 

Example:

Steps to create data preservers:

  1. Login to the target instance
  2. From the filter navigator enter sp_widget.list
  3. Filter where Name = Not Production Warning
  4. Add the Body HTML template column to your filtered view then notice the entry: PLEASE NOTE THAT THIS IS NOT PRODUCTION
  5. Confirm that this entry is correct.

Now, preserve the table and records on the source instance so the target settings will not be overwritten by clones.

  1. Login to the source instance.
  2. From System Clone > Preserve Data and create a new clone preserver:

Name: Widget

Theme: Check

Table: Widget [sp_widget]

Where Display Name = Not Production Warning

Also create a data preserver for the sp_instance table if the widget does not exist in the source. The instance record is what ties the "Not Production Warning" widget to the actual container record that is on the Service Portal page.

  1. Login to the source instance.
  2. From System Clone > Preserve Data and create a new clone preserver:

Name: Instance

Theme: Check

Table: Widget [sp_instance]

 

Next, schedule a clone to test the data preserver.

 
 
 

Article Information

Last Updated:2018-10-18 09:26:34
Published:2018-07-26