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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

The custom script is not allowed to access the XYZ table

(1) ShareShare
ReportReport
Posted on by 636
Hi Experts,
 
I am getting below error while trying to run a custom script. can anyone help me to solve it please.
 
 
I am trying to update the BankTransAmountCur value for a record in the table bankAccountTrans using below class
 
class UAPBankTransUpdate
{
  
    public static void main(Args _args)
    {
        BankAccountTrans    bankAccountTrans;
        if(curExt() != 'UAP')
        {
            throw error("This script must run in UAP entity");
        }
        select forupdate bankAccountTrans
            where bankAccountTrans.RecId == 5637187458;
        if(bankAccountTrans)
        {
            ttsbegin;
            bankAccountTrans.BankTransAmountCur = 258000.33654;
            bankAccountTrans.doUpdate();
            Info("Record updated");
            ttscommit;
        }

    }
}
 
 
 
I have the same question (0)
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,
     
    What are the roles that are assigned to the user who was running the script? Is it admin?
     
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Anton Venter Profile Picture
    20,656 Super User 2026 Season 1 on at
    Hello,
     
    Please explayin why are you updating this bank transaction? If you update the amount of this transaction, you will create a difference that cannot be accounted for.
  • André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at
    Hi,
     
    Several transaction tables are restricted to be used to make changes via custom scripts. The method name raising the error already indicates this. It is checking for supported tables. So, you can't use this table in a custom script. 

    As asked by others, what is the business reason for updating an amount directly in a posted transaction?
  • D365  beginner Profile Picture
    636 on at
    Thank you all for the response.
     
    I am having system administrator role. What happened is we had made a changes in the decimal places for some quantity related extended datatype which resulted some vendor payments and related subledger transactions are not matching with some minor difference like 0.20, 0.30 etc. we have identified those transactions and we need to do this action to match them. We have successfully done the same in UAT environment using the JIT SQL access  and now we need to do the same in live environment to match or correct the transactions. For sure I cannot edit the value in bank account transaction table ? then is there any other way than reversing those transactions and redoing it again ?. Thanks. 
  • Anton Venter Profile Picture
    20,656 Super User 2026 Season 1 on at
    Hello,
     
    You should be able to update the transaction(s) without any issues using the SysClassRunner class instead of the custom script method. But that will require your class to be deployed to production environment though and that means down time of the production environment.
  • Suggested answer
    Lauras U Profile Picture
    959 on at
    I had similar issue with updating NumberSequenceTable. Turns out that for some tables (tablegroup=Framework OR SystemTable=Yes) it needs special flighting enabled.
     
    Special flighting: AppConsistencyCustomScriptAllow%YOUR_TABLE_NAME%
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 658

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 468 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 333 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans