Delete multiple lines in the same sales order

sbilly
Member Posts: 231
Hi all,
I want to create a function that deletes multiple lines in the same sales order. How can I push the system to delete selected lines ( selection with ctrl button) like we select lines with ctrl and push the delete button of the keyboard.
Any suggestions please?
I want to create a function that deletes multiple lines in the same sales order. How can I push the system to delete selected lines ( selection with ctrl button) like we select lines with ctrl and push the delete button of the keyboard.
Any suggestions please?
0
Comments
-
First, Why you want to do this..?
what you have tried till now? There should not be any problem if you are technical.0 -
To answer ur first question:
After importing many sales lines from a csv file, I want to delete some of them in the same time.
My problem is how to make the system delete only the selected lines (selection with ctrl)0 -
Make a button and write this code on Onpush trigger.
CurrForm.SETSELECTIONFILTER(RecVar); RecVar.DELETEALL;
RecVar is Variable type of record(36,37);0 -
Thanks for help0
-
vijay_g wrote:Make a button and write this code on Onpush trigger.
CurrForm.SETSELECTIONFILTER(RecVar); RecVar.DELETEALL;
RecVar is Variable type of record(36,37);
[-X
Please do not do this, this code can corrupt your database.David Singleton0 -
Hi David,
Please tell me why this code can corrupt the database?0 -
Create a sales order.
Ship any line.
Now run your code.
The database is now corrupt.
And this is just one example, the simplest, there are plenty more cases where this code will corrupt the database.David Singleton0 -
vijay_g wrote:_________________
Vijay Gupta
Changing the code is last step. Try to change processes first...
Vijay,
please read your signature, in it lies the correct solution to this question.David Singleton0 -
Thank you for the clarification, if I understand, this code will delete any thing in the database without respect of navision rules?0
-
Why not use Deleteall(true) ?0
-
why do you need a delete button to delete the selected lines ???Microsoft Certified IT Professional for Microsoft Dynamics NAV
Just a happy frood who knows where his towel is0
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