Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

disable editing on sales order subform in sales order page

Posted on by Microsoft Employee

I want to disable the sales order subform in sales order form .

if "Disable" Then 


 CurrPage.SalesLines.Page.Editable(False);

I inserted the code on the following triggers : OnOpenPage, OnAfterGetRecord, OnNewRecord, OnModifyRecord,  OnAfterGetCurrRecord.

But the subform is still enabled.

Should I insert the code somewhere else?

Thank you

*This post is locked for comments

  • Verified answer
    Binesh Profile Picture
    Binesh 7,885 on at
    RE: disable editing on sales order subform in sales order page

    Yes you can, See the screenshot.

    sl.png

    Set the value in OnInit Trriger for testing.

    DynamicVisible := TRUE; // It showing, set FALSE if you don't want to see

    DynamicEnabled := FALSE; // Set true if you don't want to disable [By default boolean Variable is FALSE]

    After that you will get like:

    sl.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: disable editing on sales order subform in sales order page

    I tried it , we cant modify data in the subform but its still enabled. Cant we disable it completely?

  • Suggested answer
    Binesh Profile Picture
    Binesh 7,885 on at
    RE: disable editing on sales order subform in sales order page

    Hello ckassar,

    you have to write the code in "OnAfterGetCurrRecord" triger Like:

    2016_2D00_05_2D00_09_5F00_16_2D00_47_2D00_08.png

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