deleting from a lookup form?!

deepblue
Member Posts: 152
Hello,
I have a form in which i'm using a lookup form(F5). In that lookup form, i added a button that delete the selected records.
Thank you.
I have a form in which i'm using a lookup form(F5). In that lookup form, i added a button that delete the selected records.
CurrForm.SETSELECTIONFILTER(Rec); IF Rec.FINDSET THEN DELETEALL; RESET;The problem is the following: When i delete the record that was dispalyed in the first form and i close the lookup form the record that was deleted still displayed and that's not what i want. It have to be deleted and the user can't see it again.
Thank you.
0
Comments
-
You need to write CurrForm.udate(false) in the calling form. But Where? Two solutions:
1) You don't use properties to call the lookup and write code in the OnPush trigger and run the form using runmodal. When closing the lookup form you call the function I said. So you write the CurrForm.update(false) at the end of OnPush.
2) You write code on Ontimer that check if the record exists and if not it call currform.update(false) (I don't like this one.... but it's possible I think)I don't envy anybody who caught up his aim. I travel gladly.0 -
I don't like the second solution too. And the first one is not suitable for me
because my calling form is already opened and running when I close the lookup form...
Anyone has other solutions please?0 -
What I intended was to write something lije this code on calling form:
OnPush:
currRecord := rec;
if form.runmodal(lookupformID,currRecord) = action::lookupok then
rec := currRecord;
currrform.update(false);
Surely, the calling form is alive. It updates when closing the lookupform, however, but this make sense.... or not?I don't envy anybody who caught up his aim. I travel gladly.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