Post upgrade tasks for APO

concept australia Updated Mar 12, 2026 5 min read post-upgrade-tasks-for-apo.md
Raw file servicenow.com

Review and complete required post-upgrade tasks after upgrading Accounts Payable Operations.

Upgrade configuration for Accounts Payable Operations integration with Document Intelligence

Complete post-upgrade tasks after upgrading Accounts Payable Operations, including upgrading copied use cases to the latest Document Intelligence model.

Before you begin

Role required: admin

Install the Document Intelligence for Accounts Payable Operations Content Pack from the ServiceNow® Store.

Procedure

  1. Select the DO NOT USE- Invoice processing V7 use case as source.

  2. Navigate to All > Document Data Extraction Administration > Use Cases.

  3. Search for DO NOT USE- Invoice processing V7 and create a duplicate copy using the [Omitted image "duplicate-di-usecase.png"] Alt text: duplicate icon icon.

  4. Save the copied use case.

    Use the copied use case in flows and task definitions.

  5. To upgrade the copied use case to the latest Document Intelligence model, perform the following steps:

    1. Navigate to All > Fix Scripts.

    2. Search for Update DocIntel base_trained_model and select Run Fix Script.

      The existing copied use case is updated to the latest DI base model.

Restructured Invoice table

The invoice and invoice line tables are restructured in the Xanadu release.

Before Washington DC release, invoice and invoice line tables were standalone tables. With Xanadu release, the following changes are done:

  • The invoice table [sn_shop_invoice] extends the base invoice table [sn_fin_base_invoice].
  • The invoice line table [sn_shop_invoice_line] extends the base invoice line table [sn_fin_base_invoice_line].

[Omitted image "invoice-reparenting.png"] Alt text: Invoice table structure explaining the invoice table and invoice table line extending to base tables.

After you upgrade from Washington DC to Australia release, verify that your existing invoice and invoice line data has been migrated correctly. If you notice that your invoice and invoice line tables didn’t migrate properly, use the Now Support Portal to raise a case with the Technical Support team.

Run glide fix script to migrate existing data

When you upgrade the instance from Washington DC to Australia release, you must manually run the glide fix to update the invoice and invoice line tables to their respective base tables.

Before you begin

Note: Run this fix script only if you upgraded from the Washington DC release or earlier. If your instance was provisioned on Xanadu or later, the invoice and invoice line tables already extend their base tables and no action is required. The script detects this and exits without making changes, writing No reparenting required to the system log. This result is expected and does not indicate a failure.

Role required: admin

About this task

The base invoice and base invoice line tables were introduced in Xanadu. This one-time migration brings invoice data created before the upgrade into line with the current table structure. For more information, see Restructured Invoice table.

Procedure

  1. Navigate to All > System Definition > Fix Scripts.

  2. Select New.

    A new Fix script record opens.

  3. Open the fix script record.

  4. Enter Name as re-parent invoice table.

  5. Deselect the Record for rollback check box.

  6. In the Script field, add the following code for the invoice line:

    JavaScript
    (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);        } })();
  7. In the Script field, add the following code for invoice:

    JavaScript
     (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);        }  })();
  8. SelectSave.

  9. Select Submit.

    The Fix script is created.

  10. Select Run Fix Script.

  11. Verify that the re-parenting succeeded. Navigate to All > System Definition > Tables, open sn_shop_invoice, and confirm that Extends table shows sn_fin_base_invoice. Repeat for sn_shop_invoice_line, which must extend sn_fin_base_invoice_line.

    If either table still shows no parent table, check the system log for warnings from this fix script. For guidance on unmigrated invoice data, see Restructured Invoice table.

Result

The parent invoice and invoice line tables are changed to respective base tables.

Related topics

Run the fix script for Accounts Payable Operations

Run fix script for exceptions

Run the fix script after upgrading to the Australia to recalculate amounts and quantities for in-process invoices with Insufficient Goods Receipt and amount line and header variance conditions.

Before you begin

Role required: AP admin

Procedure

  1. Navigate to Source-to-Pay Workspace > All > sysauto_script.LIST table.

    The Scheduled Script Executions page appears.

  2. Search for script "APM - Recalculate In-Process Invoice Amounts and Quantity".[Omitted image "fix-script-exception.png"] Alt text: Fix script for exceptions

  3. Select Execute Now to run the fix script.

Result

The script ensures invoices that are in-process state are re-calculated against amount and quantity as per the logic of Insufficient goods receipt, Insufficient line and header amount variance.

Related topics

Invoice exceptions

Run scheduled job for cost allocation

Run a scheduled job to copy cost allocations from invoice line to purchase order line when upgrading Accounts Payable Operations from lower to higher version.

Before you begin

Role required: admin

Procedure

  1. Navigate to All > Scheduled Jobs > Update Cost Allocation for the invoice.

  2. Select the Active check box.

  3. In the script, add the following encodedQuery:

    JavaScript
    var encodedQuery = sn_shop.InvoiceLine.ORDER_LINE + 'ISNOTEMPTY^' + sn_shop.InvoiceLine.INVOICE + '.' + sn_shop.Invoice.STATE + 'IN' + sn_shop.Invoice.STATE_DRAFT + ',' + sn_shop.Invoice.STATE_PO_MAPPING_ERROR + "," + sn_shop.Invoice.STATE_SUSPECTED_DUPLICATE;
  4. Select Save and Execute Now.

    During the upgrade Accounts Payable Operations, cost allocation is auto-updated when purchase order lines are mapped to invoice lines.

Keywords APOAccounts Payable Operationspost-upgrade tasksAccounts Payable managementupgrade checklistAPOAccounts Payable OperationsDocIntelDocument IntelligenceAP caseDocument Data ExtractionAPOAccounts Payable Operationsdata migrationinvoice lineinvoice tableAP automationNow Support PortalAPOAccounts Payable Operationsinvoice exceptioninvoice processingupgrademigrationAPOAccounts Payable Operationsinvoice managementpurchase orderPOcost allocationadmin
Search documentation
Search document titles and file paths on the australia branch