Hi Everyone,
I wanted to provide an update to the issue that we sometimes see either after upgrading Dynamics GP or when records go missing from the ADH00100 table.
Unhandled script exception:
Index 0 of local array is out of range in script 'ASI_Initialize_Explorer_Tree'. Script terminated.
EXCEPTION_CLASS_SCRIPT_OUT_OF_RANGE
SCRIPT_CMD_INDEX
The steps in the following blog post are still the main troubleshooting steps that we have to address this; however, we’ve recently discovered some further steps that can be performed to address this.
To verify what exactly is causing this error message, we need to see the results of these scripts ran against your DYNAMICS/system database for Dynamics GP:
Select * from ASIEXP81 where ASI_Favorite_Type > 499 and ASI_Favorite_Type < 2000 order by ASI_Favorite_Dict_ID, ASI_Favorite_Type
Select * from ADH00100 order by ASI_Favorite_Dict_ID, ASI_Favorite_Type
Select * from ADH00101 order by ASI_Favorite_Dict_ID, ASI_Favorite_Type
With these results, we can then put together some insert scripts to make the ASIEXP81 and ADH00100 tables match. The scripts will look something like the following:
INSERT INTO DYNAMICS..ADH00100 VALUES ('0','497','5','Employment History','sa','0','0','','9','')
If the above scripts don't work, then we can use the following scripts to try and determine which records are missing manually.
Select * from ASIEXP81 where ASI_Favorite_Type > 499 and ASI_Favorite_Type < 2000 order by ASI_Favorite_Dict_ID, ASI_Favorite_Type
Select * from ADH00100 order by ASI_Favorite_Dict_ID, ASI_Favorite_Type
Select * from ADH00101 order by ASI_Favorite_Dict_ID, ASI_Favorite_Type
One thing that we have noticed is sometimes there are excess records in the ASIEXP81 table that come from third-party products like eOne’s SmartList Builder when that product isn't being used anymore. If that’s the case, then we have the option to remove those records when the INSERT scripts aren't working.
Most of these records will have an asterisk ‘*’ as the ‘ASI_Favorite_Name for some of the 500+ ASI_Favorite_Types.
If this is the case, then you can use a script like the following to remove the records, after taking a backup just in case.
DELETE DYNAMICS..ASIEXP81 WHERE DEX_ROW_ID = 'XXX'
If you need help with creating the INSERT scripts, then we are always happy to help on the support side. We’ll just need the above script results to get things started.
Hope that helps at least a little bit!
Thanks everyone!
-Jake
*This post is locked for comments