%3 or %4 codes in document number not working on import?
kimdonahower
Member Posts: 9
I have a situation where the %3 or %4 codes (that you put in a document number in the general journal to show the current month number or name) aren't working when the journal entry is created by dataporting it in from a text file. They work just fine when typed directly into the journal, but when they are brought in by dataport, the line posts as 'description %4' rathen than 'description January' or suchlike. Anyone have any ideas? Thanks much!
0
Comments
-
It is standard functionality? I never heard about that... for me it looks like some modification, and you need to call VALIDATE on the field to expand the placeholders...0
-
It is standard, been in Navision since version 2.0 when we started.kine wrote:It is standard functionality? I never heard about that... for me it looks like some modification, and you need to call VALIDATE on the field to expand the placeholders...
You can create a document number formula with one of the following codes:
Code
Result:
%1
Current day (for example, Monday)
%2
Current week (for example, 52)
%3
Current month number (for example, 1)
%4
Current month name (for example, January)
%5
Current accounting period name (for example, January)
Example:
If the entry's document number will be "R (rent) + current month," enter "R%3" in the field. The document number for January will then be R1.
If there is more than one line in the journal, the program will automatically retain the same number on subsequent lines until the balance for the journal is 0. The next consecutive number will then be entered on the next line.0 -
Ah, yes, but it work only with recurring journal, not with standard one... 8)0
-
Right, but back to my question
-- when I enter it in the recurring journal manually, it works fine, but if I dataport the same info into the recurring journal, the %4 stays %4 after it's posted -- anyone have any idea why and how I can make it work on import like it works when manually entered? The journal entry looks just the same before it's posted, it's only after posting it that the manually entered one turns into the correct month but the imported one stays %4.
Any ideas? Thanks!0 -
Here is a wild guess, it doesn't look exactly the same, my guess is thekimdonahower wrote:Right, but back to my question
-- when I enter it in the recurring journal manually, it works fine, but if I dataport the same info into the recurring journal, the %4 stays %4 after it's posted -- anyone have any idea why and how I can make it work on import like it works when manually entered? The journal entry looks just the same before it's posted, it's only after posting it that the manually entered one turns into the correct month but the imported one stays %4.
Any ideas? Thanks!
'description %4'
has a leading charater so navision is treating the whole 'description %4' as one item, and not breaking it up.0 -
The code making that document no. is this (taken from older NAV):
WITH GenJnlLine2 DO BEGIN IF ("Account No." <> '') AND ("Recurring Method" <> 0) THEN BEGIN Day := DATE2DMY("Posting Date",1); Week := DATE2DWY("Posting Date",2); Month := DATE2DMY("Posting Date",2); MonthText := FORMAT("Posting Date",0,Text024); AccountingPeriod.SETRANGE("Starting Date",0D,"Posting Date"); IF NOT AccountingPeriod.FIND('+') THEN AccountingPeriod.Name := ''; "Document No." := DELCHR( PADSTR( STRSUBSTNO("Document No.",Day,Week,Month,MonthText,AccountingPeriod.Name), MAXSTRLEN("Document No.")), '>'); Description := DELCHR( PADSTR( STRSUBSTNO(Description,Day,Week,Month,MonthText,AccountingPeriod.Name), MAXSTRLEN(Description)), '>'); END; END;
It means - no condition about what is first character etc., only that the account No. must be filled in and the recurring method must be selected.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
- 322 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
