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 click OK, you receive the following message:
The selected record has been deleted.
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.
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
1. Make a full backup of Microsoft Dynamics GP.
2. Click Microsoft Dynamics GP, point to Maintenance, and then click SQL.
3. Select the company database that is receiving the error.
4. In the Table list, click Posting Definitions Master.
5. On the right side of the window, click to select every check box, and then click Process.
6. Click 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, this 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.
1. If you use the Multicurrency 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 Multicurrency, then you can skip this step and go to step 2.
2. To run the Check Links program on the following files, click Microsoft Dynamics GP, point to Maintenance, click Check Links, click one of the following series names, and then type the corresponding Logical Table name. Follow this step for the following files:
• Module: Payables Management
Series/Logical Table: Purchasing Series - Payables Transaction Logical
• 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
3. 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, click File, click Maintenance, click PS Check links, and then click 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
• Employee Expense Batches - PS Employee Expense Transactions
• Billing Batches - PS Billing Time & Materials Transactions
4. If any batches exist in Microsoft Dynamics GP General Ledger, click Tools on the Microsoft Dynamics GP menu, point to Utilities, point to Financial, and then click Reconcile. Click Batches, and then click Reconcile to reconcile your batches.
5. Retest to verify if the error message has been resolved.
OPTION #2 - Using Professional Services Tools Library (PSTL)
1. Make a full backup of Microsoft Dynamics GP.
2. Have all the users log out of Microsoft Dynamics GP.
3. Use the steps below to install Professional Services Tools Library (PSTL) and add it as a shortcut in Microsoft Dynamics GP. If you have already done this, you can skip this step.
Steps to install Professional Tools Services Library (PSTL):
a. Vist this CustomerSource site to download PSTL: (Installation instructions are included with the download.)
https://mbs.microsoft.com/partnersource/downloads/releases/noam_pstl.htm?printpage=false&stext=professional services tools library
b. After you install PSTL, log onto Microsoft Dynamics GP as the system administrator ('sa' user).
c. Click Yes when prompted to include new code.
d. To add PSTL to your shortcut bar, click Add, click Other Window, expand Technical Service Tools, expand Project, click Professional Tools Library, click Add, and then click Done.
4. On the shortcut bar, click Professional Service Tools. Wait for the SQL objects to build. When you are prompted to enter registration keys, just click Cancel. You do not need to use registration keys to use the free toolkit.
5. Click Toolkit. Click Next.
6. Under Toolkit Options, click Recreate SQL Objects and then click Next.
7. Next to Series, click Company.
8. Next to Table, click SY00500.
9. Under Maintenance Options, click to select both the Recreate Selected Table and Recreate data for selected table(s).
IMPORTANT NOTE: 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 this, then you will lose all your current data and would have to restore to your backup immediately.
10. Click Perform Selected Maintenance.
11. When you receive the following messages, click 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
12. Re-test to see if the error message has been resolved.
13. If you continue to get the error message we will need to recreate the indexes for the SY00800 (batch activity). To do this, follow the steps below to resolve the issue: (*Make sure that you have a restorable backup of your company database in case there is unwanted data loss.)
a. Click on the Professional Services Tools Library link from your Shortcuts tab, and then choose to enable Toolkit. The Toolkit window will appear.
b. Select to Recreate SQL Objects from the Toolkit window, and then click Next.
c. Select System for the Series and SY00800 for the table.
d. Under the Maintenance Options, select to 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.
e. Click on Perform Selected Maintenance button to recreate the indexes.
If you have any batches that go to batch recovery, see KB 850289 for instructions on how to set the batch back to 'Available' status.