Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Diff between 2 Statements

(0) ShareShare
ReportReport
Posted on by 3,027

Hi

   What is the difference between first 2 statements


CLine."Sale Amount" := Amount;
CLine.VALIDATE("Sale Amount", Amount);

CDNLine.MODIFY;

Thanks

*This post is locked for comments

  • Verified answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Diff between 2 Statements

    Validate calls the OnValidate Trigger of the Field of that Table.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,749 on at
    RE: Diff between 2 Statements

    Check this link

    docs.microsoft.com/.../validate-function--record-

  • Verified answer
    CDsilva Profile Picture
    CDsilva 4,184 on at
    RE: Diff between 2 Statements

    The first line CLine."Sale Amount" := Amount; will only assign Amount to CLine."Sale Amount"

    CLine.VALIDATE("Sale Amount", Amount); will not only assign but also run the code written under  CLine."Sale Amount".

    Its recommended to use CLine.VALIDATE("Sale Amount", Amount);

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans