Intercept the page of origin

sharon95
Member Posts: 183
Hi all! My aim is to intercept the page of origin in which data will be collected in a table... not clear? I know!
Example: I have the table MyTable with some code in one trigger, I want to execute the code only if it is accessed by the page FisrtPage (and not for the all other pages)... is it possible? and if it is, how? Thank you very much!

0
Best Answer
-
yes, you can write code in page 1 onvalidate trigger of field and no need to write in table. Did you try?5
Answers
-
Firstpage is name of the page or page which executes above code first?0
-
mohana_cse06 wrote: »Firstpage is name of the page or page which executes above code first?
Firstpage is the page from which the code in the table is executed0 -
why cant you simply create a function in table and call it from page field OnValidate trigger?0
-
mohana_cse06 wrote: »why cant you simply create a function in table and call it from page field OnValidate trigger?
mmhh.. I don't have to execute the code into the table's OnValidate trigger only if it is accessed from a specific page..0 -
mmhh.. I don't have to execute the code into the table's OnValidate trigger only if it is accessed from a specific page..
0 -
mohana_cse06 wrote: »
My table is accessed from many pages (page1, page2, page3, ....).
If I am in page1 I have to execute the table's Onvalidate trigger.
If I am in page2 I have to skip that trigger
Is it clearer?0 -
yes, you can write code in page 1 onvalidate trigger of field and no need to write in table. Did you try?5
-
mohana_cse06 wrote: »yes, you can write code in page 1 onvalidate trigger of field and no need to write in table. Did you try?
I will try, thank you!0 -
Suppose you are inserting data from the Page One, then use like TableRec.Validate(field,NewValue) and if inserting from the other pages do not call the Validate, then it will simple do like field := NewValue.
OR you may try to write code in OnValidate() page trigger.Best Regards:
Zaid Tariq
Dynamics NAV/365 BC Developer at Dynamics 360
please like / agree / verify my answer, if was helpful.0 -
Hi,
table OnValidate trigger should be preferable used to ensure database integrity. If your code is to be run only in some cases, it should be separated by IF statement in table OnValidate trigger, or placed in separate function that can be called when needed without interference with validation code.0 -
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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