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

How to change table property automatically by creating batch job or by using X++ in D365FO.

(1) ShareShare
ReportReport
Posted on by
Hi Friends,
 
Please tell me

How can I automate the process of changing a table property in D365 Finance and Operations — (e.g., Allow Retention to ‘No’ or ‘Yes’): How can I automate functionality in X++ code or via Batch job?
 
I am working on D365FO where required to update (Allow Retention property to ‘No’ or ‘Yes’) of a particular table or many tables at once automatically. Based on a condition I need to toggle this property between 'No' and 'Yes.
 
Could you provide guidance on:
 
Automation of this by creating a batch job. What classes and methods should I use, and how should I structure the job to ensure it runs periodically or based on a trigger?
 
Using X++ to programmatically modify the table property. What code would be necessary to locate the table, update the property, and save the change?
 
I'd appreciate recommendations.
 
Thanks.
  • Suggested answer
    Martin Dráb Profile Picture
    241,469 Most Valuable Professional on at
    This is impossible. These properties are defined at development time; you can't change the application files from inside the running application.
     
    What you need to do instead is changing the properties in source code files, build the application and deploy it to F&O environments. If you want to change a single table (or a few), do it simply in the table designer in Visual Studio. If you need to deal with many in bulk, you can utilize the metadata API or generate/change the underlying XML file by any other mean (e.g. a Powershell script).
  • Suggested answer
    Vahid Ghafarpour Profile Picture
    12,278 on at
    To programmatically modify the table property, you’ll need to create a table extension and override the relevant method. But to create a table extension you need to create it for the target table.
    So, it is not possible to modify list of tables, except add extension to all of them.
     

    ** Please don't forget to close up the thread here by Like and verify it as an answer if it is helpful **

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
Martin Dráb Profile Picture

Martin Dráb 532 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 351 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 195

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans