Adding a field to the customer card

td323i
Member Posts: 26
Hello,
I need to add a field called "Date Opened" to the customer card so we can keep track of when customer accounts are opened. I think the step i'm missing is creating the table to hold the data. I can add the form data to the card, but can't remember how to add the field data or table to the system. Any help will be greatly appreciated.
Thanks,
Td
I need to add a field called "Date Opened" to the customer card so we can keep track of when customer accounts are opened. I think the step i'm missing is creating the table to hold the data. I can add the form data to the card, but can't remember how to add the field data or table to the system. Any help will be greatly appreciated.
Thanks,
Td
0
Comments
-
In order to add fields to tables, you need to have the appropriate design-rights.
Go to Object Designer -> Tables and choose the Customer table. Now click on the "Design" button and you see all fields of this table. Now pick a field number >= 50000 and <= 99999 which is not used, and enter a new line for the new field with this number. Name of the field will be "Date Opened" and type will be Date.
Now press Ctrl-S to save this table. If you don't have enough permissions, you won't be able to save this modification. After this, you can add this field to your form.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Hi Td,
Follow the steps to acheive the functionality.
1. Go To the object designer and add a go the design of the customer table.
2. add a new filed in the customer table called date created datatype:date in the 50000 series
3. Save the table
4. press f9 to go to the code and add the following code on the OnInsert() trigger
date created:=today;
5. Save the table and exit to the object designer
6. Select the customer card and go to the design view, using the menu editor add the filed to the form(you can set the properties of the text box as desired i mean editable/non editable etc.)
7. Save the form and exit
I hope this will give you the desired functionality.Diptish Naskar
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/0 -
What do you mean with "when customer accounts are opened"? Do you mean when they are created? Or when someone opens the customer card and views that customer.
For the first, follow the steps above;
For the second, you'll have to do some coding on form-level. OnAfterGetRecord trigger you can add your code to update the field. I can't imagine though that you want this, because it creates quite a big load on the database (e.g. disable your "find as you type" feature if you do this [-X ).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