Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to set a Default value for an option field in the page

Posted on by Microsoft Employee

Hello guys , the issue is I want to specify an a default value for DOCUMENT TYPE in the cash receipt journals page only to be only payment , putting in considerations that putting init value in the table will change it for all journals and I don't want that !

any ideas ?  

*This post is locked for comments

  • DineshM Profile Picture
    DineshM 221 on at
    RE: How to set a Default value for an option field in the page

    Hi ,How to set decimal field value  of table to suppose 100 so that it will come by default also where to write code in table ?

  • Luc van Vugt Profile Picture
    Luc van Vugt on at
    RE: How to set a Default value for an option field in the page

    Well, take advantage of the C/SIDE Development 101 webinars of NAV Skills on youtube. Search on youtube for "c/side development 101 series".

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to set a Default value for an option field in the page

    I am Functional user of NAV 2013 R2.  Can i Learn Technical to customize in short time.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to set a Default value for an option field in the page

    my bad it worked actually , thanks Mr Amol 

    much appreciation

  • Verified answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: How to set a Default value for an option field in the page

    As Luc suggested You can write the code on OnNewRecord trigger

    Just write

    "Document Type" :="Document Type"::Payment;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to set a Default value for an option field in the page

    thank you for your reply BUT ,

     could u provide the code please?

  • Luc van Vugt Profile Picture
    Luc van Vugt on at
    RE: How to set a Default value for an option field in the page

    Let code do it in the OnNewRecord trigger (or even better in an event subscriber to this trigger).

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans