Modify table from Form Trigger.

awatharam86
Member Posts: 49
Hi guys,
Is there any possibilities to modify table from Form Trigger. I mean modify table while getting records from table. Any idea guys..? Plz share..
Is there any possibilities to modify table from Form Trigger. I mean modify table while getting records from table. Any idea guys..? Plz share..
0
Comments
-
Hi awatharam86
What is your business need?
What did you try so far and why did it fail?0 -
Hi vaprog,
I'm trying to modify table record from Card Form. Each time retrieving table record, I want to modify that record in Form - OnAfterGetRecord trigger. I tried to assign value to a field and added CurrForm.SAVERECORD() function in this trigger but system is asking to rename the record. This is not what I wanted. I want each time while retrieving table record, I want to assign value to a field and save it in table. And while to view table list, I want to see record with new modified field. Any idea? Please share..0 -
What are you trying to modify and why does it have to be modified by a form?
You need to explain more about whatever you are doing and why you would rather use code on a form instead of a table.0 -
this is how my functional team asked me to do. I'm also got no idea how to develop it since i'm also new here.
This is what I developed here.0 -
Do you really need those calculated values as fields on the table? Otherwise, just use global variables (if they need to be modifyable) or place the calculating expression in the SourceExpr property of the control showing the value.
Are all these values fields in your table? If Yes, you probably should drop one of each tripple. If you need to keep them all, add OnValidate trigger code to the table fields to keep them consistent at all times.
If you still need to modify the record in the OnAfterGetRecord trigger of the form, try MODIFY(TRUE) rather than CurrForm.SAVERECORD. The record has just been retrieved from the database and the form's controls are not yet updated.0 -
You should not do this on the form but instead set the field values in the OnValidate() trigger of the various fields - and then make sure you VALIDATE the fields if setting them in code.0
-
-
OnAfterGetRecord is used to get information not to write information.
You can use that trigger to calculate variables that depend on the current record.
I don't think you can do it there and even if you could I don't think it's a good way of handling whatever you are trying to achieve.
Every time someone opens that form reading & writings will constantly be occuring.
Perhaps you should rethink on how to accomplish this task.0 -
Yes, I think itz true. We cannot actually modify record each time Form retrieving it from table. I've tried most of the method and all return error. So itz true.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