lookup on a field deletes the current data in that field

lavanyaballurgi
Member Posts: 235
There is a custom field which is linked to a table. Lets assume this field is filled currently with data XYZ. If I lookup this field and it takes me to the list its linked to.there if I press escape the data XYZ in the field become empty.
0
Comments
-
Are you sure you didnot have any code in Onlookup trigger of field in both table and form/page?0
-
- If possible use properties only (TableRelation, LookupFormID)
- Next, try to implement it in the field's OnLookup trigger (on the table). Here you assign the value to the field without validating it. Validation happens later when you leave the field.
- In the textbox cortrol's OnLookup trigger (on the form). Here you assign the value to the Text parameter of the trigger and return TRUE or FALSE depending on whether you want the returned value to be used or ignored. You do not use the value of the control's SourceExpr (the field or variable) at all.
If you use any OnLookup trigger, it is the responsibility of your code to check the return value of the call to the lookup form to check for abortion and process this condition accordingly. Usually you will do:
On a control (Code in the Form object)IF Form.RUNMODAL(...)=ACTION::LookupOK THEN ... // assign the resulting value to Text and return TRUE ELSE ...; // cleanup and return FALSE
On a field (Code in the Table object)// make sure the field's value does not get changed unless // your lookup returned a value the user intended to use IF Form.RUNMODAL(...)=ACTION::LookupOK THEN ...; // assign the resulting value to the field
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