Dataport: Importing new contacts
Noeline
Member Posts: 54
Is is possible for the the "No." field to automatically be populated/updated from the number series within Navision during an import of new records? Or does it have to exist in the import file?
Regards - Noeline
Regards - Noeline
0
Comments
-
You can do it automatically.
In the OnBeforeImport-trigger you must do a CLEAR of the record.
In the OnAfterImport-trigger, do a INSERT(TRUE) of the record.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Must be doing something wrong but it just would not work. :oops: I eventually inserted some code that is not very robust, doesn't check date ranges etc, but at least created the contact no's as required for this particular purpose.
RMsetup.GET;
NoSeriesLine.GET(RMsetup."Contact Nos.",10000);
NewNo:=NoSeriesLine."Last No. Used";
Contact."No.":=NoSeriesLine."Last No. Used";
NoSeriesLine."Last No. Used" := INCSTR(NewNo);
NoSeriesLine.MODIFY;0 -
-
THANKS!!!
According to the link this is what must be done ..."No." := ''; INSERT(TRUE); It works!
0 -
but that's what Kriki said earlierIn the OnAfterImport-trigger, do a INSERT(TRUE) of the record.
0 -
Probably it was late, and he was already sleeping (or early and still sleeping).Savatage wrote:
but that's what Kriki said earlierIn the OnAfterImport-trigger, do a INSERT(TRUE) of the record.
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I suspect my input file was the problem the first time round. But I learn't one heck of a lot from it all.

Thanks for the help.0
Categories
- All Categories
- 75 General
- 75 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions