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, ...
Answered

How to change the default value of an enum to blank/none in X++

(1) ShareShare
ReportReport
Posted on by 406
Hi guys,
 
in the fixed asset journal form, by default, when i create a new FA, the transaction type is coming acquisition. i need to change it to become showing as blank when i create a new FA instead of acquisition.  how this can be done?
 
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    It seems to be controlled by LedgerJournalEngine.initValueAsset().
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    Try to create an extension of the init method of the form DataSource, and you add your code there, or use initValue event handler as in the below link:
     
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • D365FO DEV Profile Picture
    406 on at
    Hello martin, it seems yes. can you tell me how i can change it be none as default value , which method should i override ?
    thanks
  • Verified answer
    Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    Use CoC to extend the method (LedgerJournalEngine.initValueAsset()) and change the value of _ledgerJournalTrans_Asset.TransType.
     
     

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans