Hide a field Form
Alkro
Member Posts: 115
Is possible to hide any field in a Form with code?
I have this code in OnLookUp:
With this, Item Ledger Entries form is opened, but i want user only could see Item and Lot fields, but i won't create a new form.
Regards
I have this code in OnLookUp:
varItemLedgerEntry.LOOKUPMODE := TRUE;
FormEntries.SETTABLEVIEW(varItemLedgerEntry);
IF FormEntries.RUNMODAL = ACTION::LookupOK THEN BEGIN
FormEntries.GETRECORD(varItemLedgerEntry);
VALIDATE("Lot 1", varItemLedgerEntry."Lot No.");
VALIDATE("Location 1",'10');
END;
With this, Item Ledger Entries form is opened, but i want user only could see Item and Lot fields, but i won't create a new form.
Regards
0
Comments
-
You can, but it gets complicated. You have to change the text in the OnFormat trigger for each field you don't want to display. You also have to modify codeunit 1 (NOT recommended) or disable the Zoom feature for the users. Keep in mind that code on Forms does not translate to NAV2009.
The best way really is to make another Form, though.0 -
you can make a new form or you do the following (but if the user has the permission to show coloumns, then he can display it)
//In you "FormEntries" you define a function like this NotVisibleFields() CurrForm."Item no.".visible(false); CurrForm.OtherFields.visible(false); //and the other fields that are not visible //now we run the "FormEntries" form FormEntries.SETTABLEVIEW(varItemLedgerEntry); FormEntries.NotVisibleFields(); //here we hide the fields IF FormEntries.RUNMODAL = ACTION::LookupOK THEN BEGIN FormEntries.GETRECORD(varItemLedgerEntry); VALIDATE("Lot 1", varItemLedgerEntry."Lot No."); VALIDATE("Location 1",'10'); END;
RegardsDo you make it right, it works too!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
