Convergence 2006: Microsoft Dynamics NAV - Meet the Experts

Administrator
Member, Moderator, Administrator Posts: 2,506
Convergence 2006: Microsoft Dynamics NAV - Meet the Experts
Still need answers? This is an opportunity to ask the experts your specific questions not covered in the previous sessions about the Microsoft Dynamics NAV 4.0 application and features, as well as the future strategy and road map of Microsoft Dynamics NAV.
Speaker: Niels Nybo Jensen
Duration: 1:26:07
http://www.mibuso.com/dlinfo.asp?FileID=605
Discuss this download here.
Still need answers? This is an opportunity to ask the experts your specific questions not covered in the previous sessions about the Microsoft Dynamics NAV 4.0 application and features, as well as the future strategy and road map of Microsoft Dynamics NAV.
Speaker: Niels Nybo Jensen
Duration: 1:26:07
http://www.mibuso.com/dlinfo.asp?FileID=605
Discuss this download here.
0
Comments
-
Hello While listening to the presentation. One user asked on how to merge dublicate customers. Basically a user doesn't find a customer and creates a new customer and then posts the transaction. The following report/code will merge two vendors
OBJECT Report 50043 Combine Vendors { OBJECT-PROPERTIES { Date=05/29/06; Time=[ 2:07:55 PM]; Modified=Yes; Version List=; } PROPERTIES { ProcessingOnly=Yes; OnPreReport=BEGIN IF NOT CONFIRM(STRSUBSTNO(TecText,VendorNo1,VendorNo2)) THEN ERROR(''); Vendor.GET(VendorNo2); Vendor.DELETE; CommentLine.SETRANGE("Table Name",CommentLine."Table Name"::Vendor); CommentLine.SETRANGE("No.",VendorNo1); IF CommentLine.FIND('-') THEN REPEAT CommentLine2.SETRANGE("Table Name",CommentLine."Table Name"::Vendor); CommentLine2.SETRANGE("No.",VendorNo2); IF CommentLine2.FIND('+') THEN; CommentLine3 := CommentLine; CommentLine3."No." := VendorNo2; CommentLine3."Line No." := CommentLine2."Line No." + 10000; CommentLine3.INSERT; CommentLine.DELETE; UNTIL CommentLine.NEXT = 0; CommentLine2.SETRANGE("Table Name",CommentLine."Table Name"::Vendor); CommentLine2.SETRANGE("No.",VendorNo2); IF CommentLine2.FIND('+') THEN; CommentLine3.INIT; CommentLine3.Code := 'MERGE'; CommentLine3."Table Name" := CommentLine3."Table Name"::Vendor; CommentLine3."No." := VendorNo2; CommentLine3.Date := TODAY; CommentLine3.Comment := 'Vendor ' +VendorNo1+ ' was merged'; CommentLine3."Line No." := CommentLine2."Line No." + 10000; CommentLine3.INSERT; DefaultDim1.SETRANGE("Table ID",DATABASE::Vendor); DefaultDim1.SETRANGE("No.",VendorNo1); DefaultDim1.DELETEALL; Vendor.GET(VendorNo1); Vendor2 := Vendor; Vendor.RENAME(VendorNo2); Vendor2.INSERT; Vendor2.DELETE(TRUE); END; } DATAITEMS { } REQUESTFORM { PROPERTIES { Width=8910; Height=3960; } CONTROLS { { 1000000000;TextBox;3960 ;550 ;4620 ;440 ;SourceExpr=VendorNo1; TableRelation=Vendor } { 1000000001;Label ;550 ;550 ;2860 ;440 ;ParentControl=1000000000; CaptionML=ENU=Delete Vendor } { 1000000002;TextBox;3960 ;1210 ;4620 ;440 ;SourceExpr=VendorNo2; TableRelation=Vendor } { 1000000003;Label ;550 ;1210 ;2970 ;440 ;ParentControl=1000000002; CaptionML=ENU=Merge into Vendor } } } CODE { VAR VendorNo1@1000000000 : Code[20]; VendorNo2@1000000001 : Code[20]; Vendor@1000000002 : Record 23; TecText@1000000004 : TextConst 'ENU=Are you sure you want Merge Customer %1 into Customer %2'; Vendor2@1000000007 : Record 23; CommentLine@1000000003 : Record 97; CommentLine2@1000000005 : Record 97; CommentLine3@1000000006 : Record 97; DefaultDim1@1000000008 : Record 352; BEGIN END. } }
The following will merge two customers.OBJECT Report 50044 Combine Customers { OBJECT-PROPERTIES { Date=05/10/06; Time=[ 4:05:48 PM]; Modified=Yes; Version List=; } PROPERTIES { ProcessingOnly=Yes; OnPreReport=BEGIN IF NOT CONFIRM(STRSUBSTNO(TecText,CustomerNo1,CustomerNo2)) THEN ERROR(''); Customer.GET(CustomerNo2); Customer.DELETE; CommentLine.SETRANGE("Table Name",CommentLine."Table Name"::Customer); CommentLine.SETRANGE("No.",CustomerNo1); IF CommentLine.FIND('-') THEN REPEAT CommentLine2.SETRANGE("Table Name",CommentLine."Table Name"::Customer); CommentLine2.SETRANGE("No.",CustomerNo2); IF CommentLine2.FIND('+') THEN; CommentLine3 := CommentLine; CommentLine3."No." := CustomerNo2; CommentLine3."Line No." := CommentLine2."Line No." + 10000; CommentLine3.INSERT; CommentLine.DELETE; UNTIL CommentLine.NEXT = 0; CommentLine2.SETRANGE("Table Name",CommentLine."Table Name"::Customer); CommentLine2.SETRANGE("No.",CustomerNo2); IF CommentLine2.FIND('+') THEN; CommentLine3.INIT; CommentLine3.Code := 'MERGE'; CommentLine3."Table Name" := CommentLine3."Table Name"::Customer; CommentLine3."No." := CustomerNo2; CommentLine3.Date := TODAY; CommentLine3.Comment := 'Customer ' +CustomerNo1+ ' was merged'; CommentLine3."Line No." := CommentLine2."Line No." + 10000; CommentLine3.INSERT; DefaultDim1.SETRANGE("Table ID",DATABASE::Customer); DefaultDim1.SETRANGE("No.",CustomerNo1); DefaultDim1.DELETEALL; Customer.GET(CustomerNo1); Customer2 := Customer; Customer.RENAME(CustomerNo2); Customer2.INSERT; Customer2.DELETE(TRUE); END; } DATAITEMS { } REQUESTFORM { PROPERTIES { Width=8910; Height=3960; } CONTROLS { { 1000000000;TextBox;3960 ;550 ;4620 ;440 ;SourceExpr=CustomerNo1; TableRelation=Customer } { 1000000001;Label ;550 ;550 ;2860 ;440 ;ParentControl=1000000000; CaptionML=ENU=Delete Customer } { 1000000002;TextBox;3960 ;1210 ;4620 ;440 ;SourceExpr=CustomerNo2; TableRelation=Customer } { 1000000003;Label ;550 ;1210 ;2970 ;440 ;ParentControl=1000000002; CaptionML=ENU=Merge into Customer } } } CODE { VAR CustomerNo1@1000000000 : Code[20]; CustomerNo2@1000000001 : Code[20]; Customer@1000000002 : Record 18; TecText@1000000004 : TextConst 'ENU=Are you sure you want Merge Customer %1 into Customer %2'; Customer2@1000000007 : Record 18; CommentLine@1000000003 : Record 97; CommentLine2@1000000005 : Record 97; CommentLine3@1000000006 : Record 97; DefaultDim1@1000000008 : Record 352; BEGIN END. } }
0 -
The following rule can be applies to Items, GL Accounts, Basically any master tables.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