need help... regarding relationship

roshanthapa
Member Posts: 90
Please enlighten me:
I have two tables and two forms called branch and brand. The brand contains the ralation with branch.
That means the brand contains a field called branch which has relation with branch table. Now The branch also has a list whose editable is set to false.
In my case, the branch list should be non-editable when I press f5 in branch form and should be editable when I lookup from brand table. Please tell me how can this be done. Any help will be appreciated.
I have two tables and two forms called branch and brand. The brand contains the ralation with branch.
That means the brand contains a field called branch which has relation with branch table. Now The branch also has a list whose editable is set to false.
In my case, the branch list should be non-editable when I press f5 in branch form and should be editable when I lookup from brand table. Please tell me how can this be done. Any help will be appreciated.
0
Comments
-
Or we can take this question as "How can we change the properties(like visible or editable) of the form(generally list) from the table/form from which it is being looked-up?".0
-
roshanthapa wrote:Or we can take this question as "How can we change the properties(like visible or editable) of the form(generally list) from the table/form from which it is being looked-up?".
Create a function on your list form called SetEditable.
Pass this function a Boolean which you can use to set the mode of your formCurrForm.EDITABLE(YourBooleanVar)
Code your lookups similar to:YourFormVar.SetEditable(TRUE); YourFormVar.RUN;
0 -
with this code, we can display the list in editable mode but this will not return back the value to the field from where we clicked lookup.
Any further suggestions?0 -
roshanthapa wrote:with this code, we can display the list in editable mode but this will not return back the value to the field from where we clicked lookup.
Any further suggestions?
Set any filters:YourTableVar.SETRANGE(... ...) YourFormVar.SETTABLEVIEW(YourTableVar);
Set the lookup mode:YourFormVar.LOOKUPMODE(TRUE);
Call your SetEditable function:YourFormVar.SetEditable(TRUE);
Call the form, retreive the record and process as required:
e.g.,IF YourFormVar.RUNMODAL = Action::LookupOK THEN BEGIN YourFormVar.GETRECORD(YourTableVar); Code := YourTableVar.Code; END;
0
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