Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

how to disable sub form

Posted on by 1,745

i have two form ,Main form and sub form which is linked as run object .

i want to disable the whole  subform based on the values of control on the main form .

how should i disable my sub form ?

*This post is locked for comments

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: how to disable sub form

    yes

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: how to disable sub form

    Yes Sir ,

    it worked but my question is why i have used clear funtion on the form .

  • Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: how to disable sub form

    Have you checked the Dimensions Menu button on the Sales Order?

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: how to disable sub form

    where should i write this code ?

  • Verified answer
    Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: how to disable sub form

    Hi

    You have declare a form Variable, then set the rec on the form & editable property to false and run the form like below

    Clear(formvarbl)

    formvarble.settableview(rec);

    formvarble.editable := FALSE;

    formvarble.runmodal;

    Refer the dimensions on the sales order to use how to run the form using variable

    Best Regards

    Rajasekhar.Y

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: how to disable sub form

    RecMontlyRentPaid.SETFILTER("Vendor No","No.");

    IF"Rent Balance" >  0 THEN

     FORM.RUNMODAL(0,RecMontlyRentPaid);

    i am writing this trigger in a menu item trigger but its not working

  • Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: how to disable sub form

    Hi

    Have you tried to write any code to run the form using Run or Run modal on the menu item trigger ?

    Regards

    Rajasekhar.Y

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: how to disable sub form

    Mahesh Sir

    i have created a funtion and called this function in each of these trigger

    but unfortunatly it didnt worked

  • mmv Profile Picture
    mmv 11,465 on at
    RE: how to disable sub form

    Yes.

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: how to disable sub form

    Mahesh Sir

    Do you mean to say i have to write the above in each of these form 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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans