When you upgrade the instance from Washington DC to Zurich release, you must manually run the glide fix to update the invoice and invoice line tables to their respective base tables.
Before you begin
Role required: maint
Procedure
-
Navigate to .
-
Select New.
A new Fix script record opens.
-
Open the fix script record.
-
Enter Name as re-parent invoice table.
-
Deselect the Record for rollback check box.
-
In the Script field, add the following code for the invoice line:
(function() {
const invoiceLinetableToReparent = "sn_shop_invoice_line";
const invoiceLineNewExtends = "sn_fin_base_invoice_line";
const oldExtends = "";
var invoiceLineGr = new GlideRecord("sys_db_object");
invoiceLineGr.get("name", invoiceLinetableToReparent);
if(invoiceLineGr.super_class.name == invoiceLineNewExtends) {
gs.info("{0} table already reparented to {1}. No reparenting required.", invoiceLinetableToReparent, invoiceLineNewExtends);
return;
}
try {
var invoiceLinetpc = new GlideTableParentChange(invoiceLinetableToReparent);
var reparentInvoiceLineResult = invoiceLinetpc.change(oldExtends, invoiceLineNewExtends);
} catch (e) {
gs.warn("Table parent change for sn_shop_invoice_line did not complete. Error: {0}", e);
}
})();
-
In the Script field, add the following code for invoice:
(function() {
const invoiceTableToReparent = "sn_shop_invoice";
const oldExtends = "";
const invoiceNewExtends = "sn_fin_base_invoice";
var invoiceGr = new GlideRecord("sys_db_object");
invoiceGr.get("name", invoiceTableToReparent);
if(invoiceGr.super_class.name == invoiceNewExtends){
gs.info("{0} table already reparented to {1}. No reparenting required.", invoiceTableToReparent, invoiceNewExtends);
return;
}
try {
var tpc = new GlideTableParentChange(invoiceTableToReparent);
var reparentResult = tpc.change(oldExtends, invoiceNewExtends);
} catch (e) {
gs.warn("Table parent change for sn_shop_invoice did not complete. Error: {0}", e);
}
})();
-
SelectSave.
-
Select Submit.
The Fix script is created.
-
Select Run Fix Script.
Result
The parent invoice and invoice line tables are changed to respective base tables.