Run scheduled job for cost allocation

  • Release version: Yokohama
  • Updated July 31, 2025
  • 1 minute to read
  • 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:
      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.s

    Result

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