My Customers, My Vendors, My Items
jreynolds
Member Posts: 175
These three pages are ListParts and are used in the definition role centers pages. Each of these pages is based on a new table My Customer, My Vendor, and My Item. Each of these tables has a function called AddEntities that adds records to the table. A sample of this function for My Item is shown below.
PROCEDURE AddEntities@1(FilterStr@1000 : Text[250]);
VAR
Item@1001 : Record 27;
Count@1002 : Integer;
BEGIN
Count := 0;
Item.SETFILTER("No.",FilterStr);
IF Item.FINDSET THEN REPEAT
"User ID" := USERID;
"Item No." := Item."No.";
IF INSERT THEN
Count += 1;
UNTIL Item.NEXT = 0;
END;
The functions in the other two tables are similar. I have not been able to find anywhere that these functions are used and I am wondering if anyone knows their purpose. 0
Comments
-
I can tell you what they do (add all items that matches the filter to the list) - but you probably already figured that out.
I don't know where they are used and why they count the number of records in a local variable - but it could be related to some testing that hasn't been removed (just a guess)Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
They will be used on the listplaces in the function which allows you to add some Item, Customer or Vendor into your list..0
-
I’m developing a role center for a Maintenance Supervisor. I want a list part for My Assets similar to My Customers or My Items. I developed a My Assets page (copied from the My Items page) based on a My Asset table (copied from the My Item table). In addition to the obvious changes to replace Items with Assets I removed the AddEntities function in the My Asset table. I put the My Assets page into my new role center and everything worked just fine. It would appear that the AddEntities function is not necessary.
Additionally, I exported all objects to a text file and did a string search in the text file for “AddEntities”. The only three occurrences in the entire text file were the three instances where this function is defined in My Customer, My Vendor, and My Item. AddEntities is not referenced anywhere else in the entire system. So my guess is that Freddy is correct and this is left over from some testing that has been removed. If this is indeed the case, I wish Microsoft would remove these functions from these tables as they only cause confusion to people trying to figure out how the system works.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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
