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 :
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,214 Super User 2026 Season 1 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,214 Super User 2026 Season 1 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,214 Super User 2026 Season 1 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,214 Super User 2026 Season 1 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

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

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 2

#1
sliderxb Profile Picture

sliderxb 2

#1
broberts Profile Picture

broberts 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans