triggers

shubham
Member Posts: 9
can anyone tell me exactly and clearly in deatil so that i can be able to correcly write my code in the correct triggerin nav 2009 r2....with clear explanation?
0
Best Answer
-
The links provided give you general information about the triggers available and when they are called. If this isn't sufficient information for you then please state what extra information you require, i.e. what it is specifically that you don't understand.5
Answers
-
You can start with looking at https://msdn.microsoft.com/en-in/library/dd301068.aspx . Based on your requirement you can check similar objects in standard.1
-
Please check this link : https://msdn.microsoft.com/en-us/library/dd301068.aspx
Hope this would help more than any other documentsSoftware Developer,
Archerpoint India Pvt. Ltd,Chennai.1 -
can anyone else tell otherthan this link which can clear my doubts about triggers ???
0 -
what are your doubts? shoot0
-
i am not able to get it right when i am writing my code in the right triggers
0 -
explain your requirement and show us what and where did you write code..0
-
i am just asking in gerenral about the concept of triggers but please dont share the link0
-
The links provided give you general information about the triggers available and when they are called. If this isn't sufficient information for you then please state what extra information you require, i.e. what it is specifically that you don't understand.5
-
A trigger is actually a misnomer. It is a callback function that is called by the system in case the corresponding event triggers it. So, for example, the OnInsert function in the Item table is called every time a record is inserted into the Item table. (In this case, if inserting a record through code, you have a choice of suppressing the trigger by calling the INSERT function without a TRUE as its parameter.)
0 -
First of all, you need to know that the difference between OnValidate and OnLookup for each field is that
OnValidate gets triggered when you fill something in the field and hit ENTER or just click on another field.
OnLookup is used to do something when you want your field to have lookup button on it (that button with tiny arrow, like when you choose something from drop-down list).
Also, think about when you want your code to be executed and do you have suffincient information to execute it.
For example, if you have fields X, Y, Z and W.
And you want to calculate W = X + Y - Z.
If you put code for this on OnValidate () trigger of Y (for example), it will be calculated when you fill the Y value and hit ENTER ONLY if NAV already knows values for X and Z (in other words if it's already filled).
If they are not filled, NAV will assume that they are 0.
If you enter a value in X afterwards, NAV will not calculate this again because it already took all the values and triggered the code on Y.
If you want W to get calculated every time you change either X, Y or Z,
you can:
a) put W = X + Y - Z on OnValidate for X, Y and Z.
b) put W = X + Y - Z only on Y trigger and then put the function VALIDATE(Y,Y) on OnValidate triggers of X and Z which will jump to Y OnValidate trigger every time you enter something in X or Z fields and execute W = X + Y - Z.
Hope this gives you a basic picture of HOW and WHEN you use certain triggers.
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