CurrForm.EDITABLE

Mehdi
Member Posts: 16
Hi Guys,
My Client wants a control in the Sales Order Subform F46, which consist in:
If = Item : Editable is set to No for Description
Ii <> Item : Editable is set to Yes for Description.
I've put the code below in Form.OnAfterGetRecord
The problem is that this code take effect only when the current line is insered in the table:
Suppose that the Type of the first line is set to Blank, when we create a second line with a type of Item, this code did not take effect, so obviously the the CurrForm.Description.EDITABLE is set to TRUE (it take the Type value of the previous line)
What's the solution...??
Thanks for your help.
My Client wants a control in the Sales Order Subform F46, which consist in:
If = Item : Editable is set to No for Description
Ii <> Item : Editable is set to Yes for Description.
I've put the code below in Form.OnAfterGetRecord
IF Type=Type::Item THEN CurrForm.Description.EDITABLE(FALSE) ELSE CurrForm.Description.EDITABLE(TRUE);
The problem is that this code take effect only when the current line is insered in the table:
Suppose that the Type of the first line is set to Blank, when we create a second line with a type of Item, this code did not take effect, so obviously the the CurrForm.Description.EDITABLE is set to TRUE (it take the Type value of the previous line)
What's the solution...??
Thanks for your help.
0
Comments
-
I think that's because the record hasn't been inserted yet, so the OnAfterGetRecord() trigget hasn't been fired for that record yet,0
-
Examine the difference between OnAfterGetRecord and OnAfterGetCurrentRecord. (You can add a different message in each trigger and see the behavior).0
-
I've tried to put the code in both OnAfterGetCurrRecord & OnValidate (Type) but nothing change.
Thanks for your Help0 -
Check also if you have more than one textboxes named Description.0
-
It's works, Thanks for your help0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions