Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

How to set field mandatory after click save

(0) ShareShare
ReportReport
Posted on by
I have a condition where field A = Bank or field B = Bank then field C mandatory(true).

I use the validateWrite method but got stuck when i want to set the field to mandatory.
 
[ExtensionOf(tableStr(LedgerJournalTrans))]final class LedgerJournalTrans_TOC_ValidasiOffsetAccTypeBank_Extension{    public boolean validateWrite()    {        boolean                 ret;        LedgerJournalTrans      ledgerJournalTrans;        LedgerJournalTable      ledgerJournalTable;        FormDataObject          obj;        ;        ret = next validateWrite();                        if(this.OffsetAccountType == LedgerJournalACType::Bank || this.AccountType == LedgerJournalACType::Bank)        {                        ret = checkFailed(/You Must Input Bank Transaction Type/);                        //obj = LedgerJournalTrans_ds.object(fieldNum(LedgerJournalTrans, BankTransType)).mandatory(true);                    }            return ret;            }}
can someone help me with this?
  • Martin Dráb Profile Picture
    Martin Dráb 230,853 Most Valuable Professional on at
    How to set field mandatory after click save
    We already discussed it in the duplicate thread in another forum.
     
    By the way, I moved this thread from D365 general forum to the Finance forum, because it's clearly about F&O and not about D365 in general.

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,996 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,853 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans