web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Custom Script error

(0) ShareShare
ReportReport
Posted on by 15

This is my first custom script. Getting an error saying the custom script is not allowed to access the BankAccountTrans table. Any idea what the problem is?

[12/14/2022 02:01:09 am] Test run started
[12/14/2022 02:01:31 am] The custom script is not allowed to access the BankAccountTrans table.
[12/14/2022 02:01:31 am]    at Dynamics.AX.Application.AppConsistencyCustomScriptStateChange.assertTableAccessIsSupported(String _tableName, String _accessType)
   at Dynamics.AX.Application.AppConsistencyCustomScriptStateChange.assertAccessIsSupported(Map _tablesAccessed)
   at Dynamics.AX.Application.AppConsistencyCustomScriptStateChange.process(Boolean _isTestRun)
...

...

...
Done updating 3 records for company 156, bank account QKR Accoun
File processing complete
The custom script is not allowed to access the BankAccountTrans table.
[12/14/2022 02:01:36 am] Completed

I have the same question (0)
  • Leah Ju Profile Picture
    Microsoft Employee on at
    [deleted]
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Moved to Dynamics 365 Finance Forum.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Can you give us some context, please?

    Does it mean that youe class runs successfully if you call it directly, but it fails with this error if you run it through "System administration > Periodic > Data base > Custom scripts" (in the same development environment)?

    Also, was the data updated or not? The log says that three records where updated - was it so and was it the expected number of records?

  • Jeb Baker Profile Picture
    15 on at

    Hi Martin,

    Yes my class runs successfully (in our DEV environment) if I run it using sysclassrunner. After I create a deployable package and upload it into a different environment it fails if I run it through System administration > Periodic > Data base > Custom scripts. The log says 3 records were updated but they aren't updated. I gave access to the following referenced packages - ApplicationFoundation, ApplicationPlatform, ApplicationSuite, Directory, BankTypes, Dimensions, and Ledger. Probably more than is needed but I'm trying anything at this point. I could try uploading the deployable package in our DEV environment and running there. If it's successful then maybe it's an environment thing

  • Jeb Baker Profile Picture
    15 on at

    I should also add that this happens when I'm running the test. Afterwards it changes the status to Failed and I am unable to continue.

  • Mariano Gracia Profile Picture
    on at

    I had a similar issue and it was a permission problem, have you checked that the user that is executing the custom script has the appropriate permission to access the BankAccountTrans table?

  • Alex VN Profile Picture
    1,994 on at

    Hi,

    This issue I think because custom script does not support accessing that table. You might try with simple test and raise it to MS if the error still persist.

    Regards,

  • Jeb Baker Profile Picture
    15 on at

    I Mariano. I'm executing it as Sys Admin.

  • Jeb Baker Profile Picture
    15 on at

    Hi Alex. I think you're right. I ran the script in an environment on 10.0.28 and it works fine. On 10.0.30 I get this error.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans