"Index 0 of array 'VerifyBatchTotals' is out of range in script" Error messages when trying to look up a Purchasing batch in Payables Management using Microsoft Dynamics GP
Article
This article provides a solution to errors that occur when trying to look up a Purchasing batch in Payables Management using Microsoft Dynamics GP.
Applies to: Microsoft Dynamics GP Original KB number: 2316165
Symptoms
When you go to the Payables Batch Entry window and try to look up a batch, you receive the following error message:
Unhandled Script exception:
Index 0 of array 'VerifyBatchTotals' is out of range in script.
'Batch_Lookup_Scrolling_Window SCROLL_FILL', Script terminated.
Then scroll down in the window to see the rest of the message:
When you select OK, you receive the following message:
The selected record has been deleted.
Cause
This message may be caused by a damaged record for a check batch in the SY00500 Posting Definitions Master table. This table holds the information on the batches in the system.
Resolution
To resolve this issue, recreate the SY00500 Posting Definitions Master table by using one of the two options listed below. You can recreate this table by using SQL Maintenance within Microsoft Dynamics GP or by using the free Toolkit in Professional Services Tools Library. Both options are listed below:
Note
Before proceeding, make sure you have a current restorable backup, or test these steps in a test environment first before applying the steps to your production database. Restore immediately to your backup if you get any unexpected results.
OPTION 1 - USING SQL MAINTENANCE
Make a full backup of Microsoft Dynamics GP.
Select Microsoft Dynamics GP, point to Maintenance, and then select SQL.
Select the company database that is receiving the error.
In the Table list, select Posting Definitions Master.
On the right side of the window, select every check box, and then select Process.
Select Yes to the following message:
"You have selected to drop tables; this will delete any data in them. Are you sure you want to continue?"
Note
This procedure re-creates the SY00500 - Posting Definitions Master table. However, you will temporarily lose all unposted batches. To retrieve these unposted batches, run the Check Links program on the sub modules. Then, reconcile the batches for Microsoft Great Plains General Ledger. However, it sets any batches that are set to Recurring to Single Use. You must change these batches back to Recurring if needed.
To retrieve the batches, follow these steps.
If you use the Multi-currency option in Microsoft Dynamics GP Payables Management, run the Check Links program on the Payables Historical Logical files before you run the Check Links program on the Payables Transaction Logical file. If you do use Multi-currency, then you can skip this step and go to step 2.
To run the Check Links program on the following files, select Microsoft Dynamics GP, point to Maintenance, select Check Links, select one of the following series names, and then type the corresponding Logical Table name. Follow this step for the following files:
Module: Purchase Order Processing
Series/Logical Table: Purchasing Series - Purchasing Transaction Logical
Module: Receivables Management
Series/Logical Table: Sales Series - Receivables Open Transaction
Module: Invoicing
Series/Logical Table: Sales Series - Invoice Work File
Module: Sales Order Processing
Series/Logical Table: Sales - Sales Work File
Module: Inventory
Series/Logical Table: Inventory - Inventory Transaction Work file
Module: Bill of Materials
Series/Logical Table: Inventory - Inventory - Bill of Materials Transactions file
If you use Microsoft Dynamics GP Project Series (PS) Time & Expense, you must also run Check Links on the following files. To run Check Links on the following files, select File, select Maintenance, select PS Check links, and then select one of the following file names. Follow this step for the following files:
Timesheet Batches - PS Timesheet Transactions
Asset Log Batches - PS Asset Log Transactions
Expense Log Batches - PS Expense Log Transactions
Inventory Transfer Batches - PS Inventory Transfer Transactions
Purchase Order Batches - PS Purchase Order Transactions
Series name: Vendor Invoice Batches - PS Vendor Invoice Transactions
Billing Batches - PS Billing Time & Materials Transactions
If any batches exist in Microsoft Dynamics GP General Ledger, select Tools on the Microsoft Dynamics GP menu, point to Utilities, point to Financial, and then select Reconcile. Select Batches, and then select Reconcile to reconcile your batches.
Retest to verify if the error message has been resolved.
OPTION #2 - Using Professional Services Tools Library (PSTL)
Make a full backup of Microsoft Dynamics GP.
Have all the users sign out of Microsoft Dynamics GP.
Use the steps below to install Professional Services Tools Library (PSTL) and add it as a shortcut in Microsoft Dynamics GP. If you've already done it, you can skip this step.
Steps to install Professional Tools Services Library (PSTL):
Visit this CustomerSource site to download PSTL: (Installation instructions are included with the download.)
After you install PSTL, sign into Microsoft Dynamics GP as the system administrator ('sa' user).
Select Yes when prompted to include new code.
To add PSTL to your shortcut bar, select Add, select Other Window, expand Technical Service Tools, expand Project, select Professional Tools Library, select Add, and then select Done.
On the shortcut bar, select Professional Service Tools. Wait for the SQL objects to build. When you're prompted to enter registration keys, just select Cancel. You don't need to use registration keys to use the free toolkit.
Select Toolkit. Select Next.
Under Toolkit Options, select Recreate SQL Objects and then select Next.
Next to Series, select Company.
Next to Table, select SY00500.
Under Maintenance Options, select both the Recreate Selected Table and Recreate data for selected table(s).
Important
You must select the Recreate data for selected table(s) check box so that the current data in the table is retained. If you forget to mark it, then you'll lose all your current data and would have to restore to your backup immediately.
Select Perform Selected Maintenance.
When you receive the following messages, select OK:
Table will be recreated with data
SY00500 table will be recreated with data. Verify a backup has been made before proceeding
SY00500 has been recreated
Retest to see if the error message has been resolved.
If you continue to get the error message, we'll need to recreate the indexes for the SY00800 (batch activity). To do it, follow the steps below to resolve the issue: (*Make sure that you have a restorable backup of your company database in case there's unwanted data loss.)
Select the Professional Services Tools Library link from your Shortcuts tab, and then choose to enable Toolkit. The Toolkit window will appear.
Select Recreate SQL Objects from the Toolkit window, and then select Next.
Select System for the Series and SY00800 for the table.
Under the Maintenance Options, select Rebuild Indexes for the Selected Table.
Note
Verify that no one is posting or editing a batch when the indexes are being recreated for this table. The SY00800 table has a record in it any time a user is editing or posting a batch in any module.
Select Perform Selected Maintenance button to recreate the indexes.
By using batch jobs, you can avoid slowing down your computer or the server during typical working hours. You can run many tasks in finance and operations apps as part of batch jobs. For example, batch jobs can include tasks for printing reports, performing maintenance, or sending electronic documents.
Describes that you receive an error message when you try to post a batch in Microsoft Dynamics GP, or in Microsoft Business Solutions - Great Plains 8.0. Provides a resolution.
Error message - A deposit for this checkbook has already been started that occurs in Bank Reconciliation in Microsoft Dynamics GP. Provides a resolution.
Provides a solution to an error that occurs when you try to post a batch and open it in Microsoft Dynamics GP or in Microsoft Business Solutions - Great Plains.