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 :
Microsoft Dynamics NAV (Archived)

How to set document type is mandatory for all type of " account type" available in list except the "G/L Account"

(0) ShareShare
ReportReport
Posted on by 1,893

Dear Experts,

In bank receipt voucher

I want to set "Document Type" as a TESTFIELD for all account type except the "G/L Account". where i need to write the condition and please provide me the tips to write the condition.

7752.test01.png

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    Didnt get your requirement. can you be more clear please

  • manish.yadav Profile Picture
    1,893 on at

    Dear Sir,

    For example when we post the bank entry always ask "Document Type Can Not be blank",

    but if we are doing the general entry there will be no message.

    I hope you can understand.

  • Suggested answer
    Ahmed Mohamed Rafik Profile Picture
    3,049 User Group Leader on at

    Hi MKY,

    You can refer to this thread as it this question answered before.

    community.dynamics.com/.../162390

    If you find this answer helpful, you can share it with community members as a Verified answer by click Yes.

  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    did you try writing TESTFIELD code under Post Action trigger of bank entry page?

  • ShanAbeywicrema Profile Picture
    948 on at

    You can use TESTFIELD . Have you tried it ?

  • manish.yadav Profile Picture
    1,893 on at

    yes sir, I want to use as a "Document Type" mandatory when the we do the bank related entry.

  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    what code did you try?

  • manish.yadav Profile Picture
    1,893 on at

    Thank you for the timely reply.

    I write the logic something like that...but where I needs to write it.

    IF "Account Type"="Account Type" ::"Bank Account" THEN

     TESTFIELD("Document Type");

  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    if you want to have document type filled while selecting the Account Type. then you can write it in Account type onvalidate trigger

    or if you want it while trying to post then write it in post onaction trigger

  • manish.yadav Profile Picture
    1,893 on at

    Than you sir.

    I will confirm you tomorrow.

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans