Hiding Confirmation/Messages

madm
Member Posts: 92
when entering a sales order, there is a function which is called from the insert/modify section of the table which prompts the user to (not) accept changes. this works fine.
however, when changing the delivery dates etc on the header, then this also updates the lines. Of course, this then reasks the questions all over again!
I there anyway hide this sales line prompts (not the delivery date - update line message), which have been originally answered (eg the user chooses NO at this stage to keep the line as it was).
If i remove the trigger from the on modify, then this does cure it, however, if the line needed to directly modified then of course the function isnt called!!
however, when changing the delivery dates etc on the header, then this also updates the lines. Of course, this then reasks the questions all over again!
I there anyway hide this sales line prompts (not the delivery date - update line message), which have been originally answered (eg the user chooses NO at this stage to keep the line as it was).
If i remove the trigger from the on modify, then this does cure it, however, if the line needed to directly modified then of course the function isnt called!!
0
Comments
-
Add it to the onvalidate of the field. add your code to something like this
if xrec."Your field" <> "Your field" then if not confirm('are you sure you want to do this?') then error('action canceled');
0 -
thanks for that..
just to clarify :
if i remove the call from insert/modify to the on validate field of the sline..
as the confirmations are within the function, would this be ok?
am i correct, in thinking xrec basically copies the current value in that field?
if xrec."Your field" <> "Your field" then
function0 -
yes you can move it to a function. Xrec is the value of the record before the field is populated. So you the if statement checks and makes sures the value has changed and then gives the confirm message.0
-
A wet sunday afternoon, so what other way to spend it
i have been playing in a test environment, and found leaving everything as it was, but adding
if xrec.quantity = quantity then
exit
to the beginning of the function appears to have cured it..
should it have been that easy?!
edit : my vpn had blocked my local internet access, so my page hadnt updated, thus not seeing your reply0 -
thought about a situation, we may be affected..
if we directly change the quantity on the line, then of course the function isnt going to be called which is required..
think i have some more playing to do!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