Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Suggested answer

Unhandled script exception: Index 0 of local array is out of range in script 'ASI_Initialize_Explorer_Tree'. Script terminated.

Posted on by Microsoft Employee

Unhandled script exception:
Index 0 of local array is out of range in script 'ASI_Initialize_Explorer_Tree'. Script terminated.

Looked at previous answers and the insert script they suggested, the table already has that data present.

pastedimage1583168563872v1.png

Categories:
  • Suggested answer
    RE: Unhandled script exception: Index 0 of local array is out of range in script 'ASI_Initialize_Explorer_Tree'. Script terminated.

    What you'll want to do is run these three scripts:

         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

    The error you're seeing is usually caused by running the old version of our ClearCompanies script which sees a companyID of 0, which no GP company database will ever have, and removes those records from the ADH00100 and/or ADH00101 tables, which causes the above error when accessing SmartList, and the SmartList reports don't show or work.

    The screenshot you sent appears to be the ADH00100 table, and those three reports are default reports that should have records in the ADH00100 and ADH00101.

    What you should also see in the ADH00100 and ADH00101 tables are records for any custom SmartList reports that are returned by the first script above, which runs against the ASIEXP81 table.

    The ADH00100 table will have one record per custom SmartList report and then the ADH00101 table will have records for each column/field that are in the custom report.

    For example, if the ASIEXP81 returns records for a 0/500 and a 0/501 report, the ADH00100 table should have these two records as well, and the ADH00101 would have at least one record for each report, but more than likely more than that. If they do not, they need to be either manually added or copied from a backup of the DYNAMICS/system database.

    If you need assistance with looking at the script results and/or fixing these tables, open up a support case and we can resolve the issue fairly easily in most cases.

    community.dynamics.com/.../unhandled-script-exception-index-0-of-local-array-is-out-of-range-in-script-39-asi-initialize-explorer-tree-script-terminated

    Thank you,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Product updates

Dynamics 365 release plans